Debug Output in Shipping

There needs to be a flag that turns logging in a shipping version on so that we can get some feedback from testers when a crash or problem occurs. Right now the only way is to get the source version of the engine and recompile it with logging enabled which is a HUGE pain in the butt. I’m sitting here and watch the engine being compiled for the Xth time these past days without any changed made to it by me. The compilation process is just not working well.

It can not be too much asked to add boolean flag to turn on logging. It really doesn’t use up that much time to check a flag

Printing stuff to the log is relatively expensive to do, so you definitely want to have it compiled out in a shipping config by default. Since its compiled out, you can’t just enable it without recompiling the whole engine, if you want to set it after the engine is already compiled then it would have to do a if() in every place where something is printed to the log. It wouldn’t just be that if but also some functions that only have UE_LOG inside would no longer be completely discarded during compile, so you would also get unnecessary function calls in shipping config then.

I agree that it can be very helpful to have testers report why something didn’t work correctly, I would suggest that you setup your own game-related logging for that. So print out to your own text file, on a separate thread. Then you can keep UE4s logging disabled and don’t suffer from any performance decreases caused by that :slight_smile:

In case somebody is looking for this, here’s the answer: