# Enable output logs for Shipping Build

**URL:** <https://forums.unrealengine.com/t/enable-output-logs-for-shipping-build/439865>\
**Category:** C++\
**Tags:** output-log, shipping-build, unreal-engine, CPP, question\
**Created:** [December 20, 2018, 4:57pm UTC](https://forums.unrealengine.com/t/enable-output-logs-for-shipping-build/439865 "2018-12-20T16:57:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![glory13](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@glory13](https://forums.unrealengine.com/u/glory13)\
**Post date:** [December 20, 2018, 4:57pm UTC](https://forums.unrealengine.com/t/enable-output-logs-for-shipping-build/439865/1 "2018-12-20T16:57:57Z")

</div>

I have a crash only in an IOS shipping build. I would like to see logging but have not been able to get it turned on in shipping builds. I have scoured the internet and have tried the following suggestions. (The name of my project is Olok and using engine 4.20)

A: Added bUseLoggingInShipping = true; as suggested by //https://answers.unrealengine.com/questions/383407/how-to-log-in-shipping-build-win.html

This gave error…

ERROR: Olok modifies the value of bUseLoggingInShipping. This is not allowed, as Olok has build products in common with UE4Game.  
[2018.12.20-16.22.43:940][224]UATHelper: Packaging (iOS): Remove the modified setting or change Olok to use a unique build environment by setting ‘BuildEnvironment = TargetBuildEnvironment.Unique;’ in the OlokTarget constructor.

I then did what the output suggested and added  
BuildEnvironment = TargetBuildEnvironment.Unique; in the constructor. But, this gave the error…  
ERROR: System.IO.DirectoryNotFoundException: Could not find a part of the path ‘C:\Olok\Intermediate\Build\IOS\Olok\Shipping\Launch\Launch.precompiled’.

I gave up on that.

I since analyzed the engine code and found that i could try and set the #define USE\_LOGGING\_IN\_SHIPPING to 1 by adding PublicDefinitions.Add(“USE\_LOGGING\_IN\_SHIPPING=1”); in my Olok.Build.cs ModuleRules Constructor. But it gives the error…

/Users/dannydiaz/UE4/Builds/SHEMO/C/Olok/Intermediate/Build/IOS/UE4/Shipping/Olok/Definitions.h(52,9): error: ‘USE\_LOGGING\_IN\_SHIPPING’ macro redefined [-Werror,-Wmacro-redefined]  
[2018.12.20-16.34.22:524][537]UATHelper: Packaging (iOS): #define USE\_LOGGING\_IN\_SHIPPING 1

I have not tried changing the engine code and rebuilding the engine. I don’t really want to do that. Is there any other way to do this?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_aef81257](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_aef81257](https://forums.unrealengine.com/u/anonymous_user_aef81257)\
**Post date:** [February 19, 2019, 12:35pm UTC](https://forums.unrealengine.com/t/enable-output-logs-for-shipping-build/439865/2 "2019-02-19T12:35:54Z")

</div>

I have the same problem as of 4.21.2. This is ridiculous.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_aef81257](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_aef81257](https://forums.unrealengine.com/u/anonymous_user_aef81257)\
**Post date:** [February 19, 2019, 12:51pm UTC](https://forums.unrealengine.com/t/enable-output-logs-for-shipping-build/439865/3 "2019-02-19T12:51:53Z")

</div>

BTW: Did you ever find a way to activate logging for your shipping builds?

---

<div class="post-metadata">

**Author:** ![glory13](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@glory13](https://forums.unrealengine.com/u/glory13)\
**Post date:** [February 23, 2019, 8:26pm UTC](https://forums.unrealengine.com/t/enable-output-logs-for-shipping-build/439865/4 "2019-02-23T20:26:30Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_219611b6](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_219611b6](https://forums.unrealengine.com/u/anonymous_user_219611b6)\
**Post date:** [June 20, 2020, 10:53am UTC](https://forums.unrealengine.com/t/enable-output-logs-for-shipping-build/439865/5 "2020-06-20T10:53:54Z")

</div>

whats that mean?

---

<div class="post-metadata">

**Author:** ![nande](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nande/32/1057698_2.png) [@nande](https://forums.unrealengine.com/u/nande)\
**Post date:** [November 17, 2024, 6:54am UTC](https://forums.unrealengine.com/t/enable-output-logs-for-shipping-build/439865/6 "2024-11-17T06:54:32Z")

</div>

[https://dev.epicgames.com/community/learning/knowledge-base/vzvZ/unreal-engine-enabling-logging-in-shipping-builds](https://dev.epicgames.com/community/learning/knowledge-base/vzvZ/unreal-engine-enabling-logging-in-shipping-builds)
