# How to log in shipping build (Win)?

**URL:** <https://forums.unrealengine.com/t/how-to-log-in-shipping-build-win/349171>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [March 1, 2016, 9:27am UTC](https://forums.unrealengine.com/t/how-to-log-in-shipping-build-win/349171 "2016-03-01T09:27:00Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_b02e8d3e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b02e8d3e](https://forums.unrealengine.com/u/anonymous_user_b02e8d3e)\
**Post date:** [March 1, 2016, 9:27am UTC](https://forums.unrealengine.com/t/how-to-log-in-shipping-build-win/349171/1 "2016-03-01T09:27:00Z")

</div>

How do you enable logging so it logs in shipping?  
I have some log console commands in blueprints but it doesn’t save any logs.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [August 3, 2016, 3:03pm UTC](https://forums.unrealengine.com/t/how-to-log-in-shipping-build-win/349171/2 "2016-08-03T15:03:06Z")

</div>

Hey AchilleDepla-

The default for shipping builds is to not print out an logs for any platform, though it can be overridden to do so. USE\_LOGGING\_IN\_SHIPPING needs to be defined. This can be enabled by enabling bUseLoggingInShipping in UBT.

Cheers

---

<div class="post-metadata">

**Author:** ![CodeSpartan](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/codespartan/32/1194561_2.png) [@CodeSpartan](https://forums.unrealengine.com/u/CodeSpartan)\
**Post date:** [August 20, 2016, 11:57am UTC](https://forums.unrealengine.com/t/how-to-log-in-shipping-build-win/349171/3 "2016-08-20T11:57:59Z")

</div>

Hi ,

Could you elaborate on where should we modify it? I’ve tried both modifying the xml in the engine’s Engine\Saved\UnrealBuildTool folder and setting bUseLoggingInShipping = true in the source code (UEBuildConfiguration.cs) - doesn’t seem to work. Normally the logs are in Saved/Logs folder, but that folder is not created in my packaged game’s folder after the play session. The “-log” parameter for the shortcut also doesn’t do anything.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [August 22, 2016, 5:18pm UTC](https://forums.unrealengine.com/t/how-to-log-in-shipping-build-win/349171/4 "2016-08-22T17:18:39Z")

</div>

Hey CodeSpartan-

You can find the setting for USE\_LOGGING\_IN\_SHIPPING in the Source/Runtime/Core/Public/Misc/Build.h file. Changing the define here should allow you to get logging information in a shipping build.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2709d010](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2709d010](https://forums.unrealengine.com/u/anonymous_user_2709d010)\
**Post date:** [February 3, 2017, 10:25am UTC](https://forums.unrealengine.com/t/how-to-log-in-shipping-build-win/349171/5 "2017-02-03T10:25:31Z")

</div>

Oh god dont tell me you have to actually rebuild the engine to turn this on??

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [February 3, 2017, 3:06pm UTC](https://forums.unrealengine.com/t/how-to-log-in-shipping-build-win/349171/6 "2017-02-03T15:06:50Z")

</div>

Since this is a change to an engine source file, you would need to use a source version of the editor (the binary version from the launcher would not allow you to edit the file). Since a change to a source file is being made, you would need to compile after making the change. Since this is a single line being changed, the compile time should not be as long as an initial compile of the entire engine.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2709d010](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2709d010](https://forums.unrealengine.com/u/anonymous_user_2709d010)\
**Post date:** [February 4, 2017, 8:20am UTC](https://forums.unrealengine.com/t/how-to-log-in-shipping-build-win/349171/7 "2017-02-04T08:20:40Z")

</div>

Just for the record, I set that flag to 1 in the aforementioned H file and spend all day getting this engine to compile and run with my project and create a packed shipping version of my project and NADA! Zip, Zilch.  
No logfile is created.

Seriously this is an ESSENTIAL feature. How else do you expect us to find errors on a client’s machine when there is no logfile? What were your people thinking when they decided that logfiles are useless as a tool to find errors?

---

<div class="post-metadata">

**Author:** ![TooManyCrashes](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TooManyCrashes](https://forums.unrealengine.com/u/TooManyCrashes)\
**Post date:** [February 6, 2017, 9:49pm UTC](https://forums.unrealengine.com/t/how-to-log-in-shipping-build-win/349171/8 "2017-02-06T21:49:32Z")

</div>

I am experiencing this issue as well. I set USE\_LOGGING\_IN\_SHIPPING to 1, then rebuild a huge part of the engine, but when I run the standalone shipping game there is no log file. Could this be a bug or is there something else that we need to set up?

Thanks,

Franco

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2709d010](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2709d010](https://forums.unrealengine.com/u/anonymous_user_2709d010)\
**Post date:** [February 7, 2017, 9:59am UTC](https://forums.unrealengine.com/t/how-to-log-in-shipping-build-win/349171/9 "2017-02-07T09:59:16Z")

</div>

I finally got it going based on [this thread](https://answers.unrealengine.com/questions/146617/how-to-turn-on-logging-on-shipping-build.html).  
NOTE THE LAST PASSAGE IN THAT POST:

> : Good thing to know for  
> future Googlers, for shipping builds,  
> save games and log files go in  
> C:\Users\UserName\AppData\Local\GameName

The logfile will not go in your game directory, but into this fixed location!

---

<div class="post-metadata">

**Author:** ![Spiris](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Spiris](https://forums.unrealengine.com/u/Spiris)\
**Post date:** [March 9, 2017, 9:26pm UTC](https://forums.unrealengine.com/t/how-to-log-in-shipping-build-win/349171/10 "2017-03-09T21:26:42Z")

</div>

So I am just reporting this here in order to make it a more complete answer. Generally changing the UEBuildConfiguration.cs or USE\_LOGGING\_IN\_SHIPPING directly in engine is less than the desired usage. Though it may be changing things for the better in one case it is better to set variables in your target files like so:

```
public override void SetupGlobalEnvironment(TargetInfo Target,
           ref LinkEnvironmentConfiguration OutLinkEnvironmentConfiguration,
           ref CPPEnvironmentConfiguration OutCPPEnvironmentConfiguration
           )
    {
        OutCPPEnvironmentConfiguration.Definitions.Add("USE_LOGGING_IN_SHIPPING=1");
        UEBuildConfiguration.bUseLoggingInShipping = true;
    }
```

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_49a519741](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_49a519741](https://forums.unrealengine.com/u/anonymous_user_49a519741)\
**Post date:** [June 25, 2017, 1:23am UTC](https://forums.unrealengine.com/t/how-to-log-in-shipping-build-win/349171/11 "2017-06-25T01:23:49Z")

</div>

Everything before your post is a chronicle of people not finding the solution. Your post is the solution. You should put it in a separate answer and it should be marked as correct. All I can do is up-vote your post.

---

<div class="post-metadata">

**Author:** ![Vejgaard](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Vejgaard](https://forums.unrealengine.com/u/Vejgaard)\
**Post date:** [August 21, 2017, 8:46am UTC](https://forums.unrealengine.com/t/how-to-log-in-shipping-build-win/349171/12 "2017-08-21T08:46:23Z")

</div>

Hi, did you get this to work? I have tried adding this to my games target file and it still doesn’t use logging in shipping.

---

<div class="post-metadata">

**Author:** ![straypet](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@straypet](https://forums.unrealengine.com/u/straypet)\
**Post date:** [September 20, 2017, 12:45pm UTC](https://forums.unrealengine.com/t/how-to-log-in-shipping-build-win/349171/13 "2017-09-20T12:45:53Z")

</div>

You have to change this in the UE4Game.Target.cs (or Client/Editor/Server or all depending on your needs) in the UE4 engine source code.  
You need to build the engine from source with these options for the engine to support logging in the shipping build.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_49a519741](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_49a519741](https://forums.unrealengine.com/u/anonymous_user_49a519741)\
**Post date:** [December 2, 2017, 1:08am UTC](https://forums.unrealengine.com/t/how-to-log-in-shipping-build-win/349171/14 "2017-12-02T01:08:19Z")

</div>

With 4.18, you can just add “bUseLoggingInShipping = true;” to the TargetRules constructor in your Target.cs file.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6f0e22f9](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6f0e22f9](https://forums.unrealengine.com/u/anonymous_user_6f0e22f9)\
**Post date:** [March 8, 2018, 1:26pm UTC](https://forums.unrealengine.com/t/how-to-log-in-shipping-build-win/349171/15 "2018-03-08T13:26:55Z")

</div>

do i need to add this in my “MyGame”.Target.cs ?and is this possible for the engine from the launcher or only for source builds of the engine?

Thanks in advance,

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_49a519741](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_49a519741](https://forums.unrealengine.com/u/anonymous_user_49a519741)\
**Post date:** [March 8, 2018, 7:04pm UTC](https://forums.unrealengine.com/t/how-to-log-in-shipping-build-win/349171/16 "2018-03-08T19:04:04Z")

</div>

Yes and I think it should but I use the source-built engine so I can’t say I’ve tried it.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_49a519741](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_49a519741](https://forums.unrealengine.com/u/anonymous_user_49a519741)\
**Post date:** [March 10, 2018, 5:25am UTC](https://forums.unrealengine.com/t/how-to-log-in-shipping-build-win/349171/17 "2018-03-10T05:25:56Z")

</div>

Update: I was a bit mistaken. The answer above was updated to the correct flag to set. I originally said it was Target.bUseLoggingInShipping but it’s in the TargetRules, not the TargetInfo. I’m building something now to make sure it works but it will be a while (full rebuild) so I thought I’d get this correction up now.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_49a519741](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_49a519741](https://forums.unrealengine.com/u/anonymous_user_49a519741)\
**Post date:** [March 10, 2018, 5:58am UTC](https://forums.unrealengine.com/t/how-to-log-in-shipping-build-win/349171/18 "2018-03-10T05:58:14Z")

</div>

Ya. It works. Doesn’t seem to show my PrintString calls though. Just the C++ log calls.

---

<div class="post-metadata">

**Author:** ![theonecalledtom](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@theonecalledtom](https://forums.unrealengine.com/u/theonecalledtom)\
**Post date:** [March 15, 2018, 4:33pm UTC](https://forums.unrealengine.com/t/how-to-log-in-shipping-build-win/349171/19 "2018-03-15T16:33:06Z")

</div>

@ this fight between shipping and development is always an issue but I totally understand why hoops need to be jumped through. Debugging information embedded in print statements generates massive binaries and needs to be removed from the binaries. Every AAA project I’ve worked on has always had this issue. Perhaps one day we’ll be at a point where machines and download/load speeds are so powerful that we just don’t care but it seems likely that for a long time yet a project that takes care to remove this data will significantly out perform a project that doesn’t.

On rebuild step 16/1445 here so I feel your frustration!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_49a519741](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_49a519741](https://forums.unrealengine.com/u/anonymous_user_49a519741)\
**Post date:** [March 15, 2018, 4:44pm UTC](https://forums.unrealengine.com/t/how-to-log-in-shipping-build-win/349171/20 "2018-03-15T16:44:03Z")

</div>

Additionally, with the new \*.Target.cs option (see my answer), it still forces a full rebuild. Even if I only change MyServer.Target.cs, it causes the client to be rebuilt from scratch.

Also, I have noticed that this option only lets the UE\_LOG messages through. BP “PrintString” nodes are not displayed. Personally, I call that a bug – or maybe a missing feature (another option we can set in TargetRules). The work-around is to expose a C++ function to BPs so they can call into it and perform a UE\_LOG, but it should be easier IMO.

[Next page](https://forums.unrealengine.com/t/how-to-log-in-shipping-build-win/349171.md?page=2)
