Menu

UE4 Quick Tip: Logging in Shipping Builds

unreal-engine icon

UE4 Quick Tip: Logging in Shipping Builds


January 7th, 2021

By default, packaged games using the Shipping configuration will not log anything at all. This is great for security. However, when your play testers and live player's run into issues, it can be very difficult to troubleshoot without logs.

With a small change, it is possible to enable logging in your shipping builds. Surprisingly, this one required a little but of research and trial and error.

In your {projectname}.Target.cs file, in the contrsuctor, add the following line: bUseLoggingInShipping = true;

By itself this will cause your builds to fail. You also need to set one of two other flags depending on whether or not you're using a source build of UE4 or one installed from the Epic Games Launcher.

If using a source build add: BuildEnvironment = TargetBuildEnvironment.Unique

If using an installed version, add: bOverrideBuildEnvironment = true;

You should also consider keeping logging disabled in shipping and handling uncaught errors different. For example, gracefully falling back to your main menu and displaying an error message to the user.

© 2022 Stefan Perales

Built with by peralysis