Enable output logs for Shipping Build

I looked deeper into the code and found that USE_LOGGING_IN_SHIPPING defines out the logging code completely. This means that you must rebuild the engine with the define toggled to 1.

You should be able to achieve this by adding bUseLoggingInShipping into some config file. However, I could never get that to work. There are many build config files and they seem to change overtime with different releases.

So i went straight to the source and modified the flag…

I got it to work by changing and rebuilding UnrealBuildTool

Change…
GlobalCompileEnvironment.Definitions.Add(“USE_LOGGING_IN_SHIPPING=0”);
to
GlobalCompileEnvironment.Definitions.Add(“USE_LOGGING_IN_SHIPPING=1”);
in UEBuildTarget.cs

I also modified Build.h and set the flag there to 1, but i don’t think that was necessary to get it working.

You can verify that its set correctly by right clicking your project in visual studio. Then look at the preprocessor defines in the NMake panel. It should list USE_LOGGING_IN_SHIPPING=1 in there. if it is set to 0 there, then try deleting your intermediate directories and regenerate projects.

2 Likes