# Enable logging in shipping build using Installed Builds?

**URL:** <https://forums.unrealengine.com/t/enable-logging-in-shipping-build-using-installed-builds/1805603>\
**Category:** C++\
**Tags:** logging, Builds, unreal-engine, shipping-build, question\
**Created:** [April 16, 2024, 12:03am UTC](https://forums.unrealengine.com/t/enable-logging-in-shipping-build-using-installed-builds/1805603 "2024-04-16T00:03:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![frisbone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/frisbone/32/725191_2.png) [@frisbone](https://forums.unrealengine.com/u/frisbone)\
**Post date:** [April 16, 2024, 12:03am UTC](https://forums.unrealengine.com/t/enable-logging-in-shipping-build-using-installed-builds/1805603/1 "2024-04-16T00:03:23Z")

</div>

> Logging is enabled only in Debug and Development builds. To enable logging in Test and Shipping builds set “bUseLoggingInShipping=true” in your \*.Target.cs file.

This is from [Advanced Debugging in Unreal Engine | Tutorial](https://dev.epicgames.com/community/learning/tutorials/dXl5/advanced-debugging-in-unreal-engine#:~:text=Logging%20is%20enabled%20only%20in,cs%20file). And implies that its a pretty simple process. However, in practice it seems that you’ll get an error that tells you first you need to have another value set in order to enable this when using an Installed Build (which I am). So the question is - what is the proper way then to enable this when using an installed build when it seems to be prohibited from within your project?

I thought perhaps just set the flag to be true anywhere it is false in the source Target.cs parent class inside my build but doing that just created a whole bunch of new build issues. Anyway, looking to see if anyone else has done this so I can just do it right the first time instead of just guessing. No documentation I can see that identifies the right way.

---

<div class="post-metadata">

**Author:** ![A.RADIX](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@A.RADIX](https://forums.unrealengine.com/u/A.RADIX)\
**Post date:** [April 24, 2024, 9:20am UTC](https://forums.unrealengine.com/t/enable-logging-in-shipping-build-using-installed-builds/1805603/2 "2024-04-24T09:20:10Z")

</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)

This tutorial says, you need to have 2 lines added in your Project.target.cs file :

```auto
BuildEnvironment = TargetBuildEnvironment.Unique;
bUseLoggingInShipping = true;

```

But if you use : `BuildEnvironment = TargetBuildEnvironment.Unique;` inside an Installed build, you will have this error when packaging your game :  
`UATHelper: Packaging (Windows): Targets with a unique build environment cannot be built with an installed engine.`

So, for an installed build, you need to only set :

```auto
bUseLoggingInShipping = true;

```

**Also, logs are NOT generated in your project’s saved folder in SHIPPING !** They are inside the :  
`C:/Users/my.username/AppData/Local/MyProject` folder

This last point took me days to figure it out why I had no logs at all in my project’s Saved folder 😅

I’m also working with an installed build. I did 3 changes, but I’m not sure they are all necessary.

With all those changes (3 Source modifications + Project.target.cs changes) , I’m able to have logs in an Installed build in Shipping game.  
Maybe some of them are over kill, but it takes more than 5 hours to test without one of them. So I keep them. 😅

 ![2024_04_25_09h41m31](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/3/2/c32af1bb805a6afe9f394b36dd512f8e67bce663.png)

---

<div class="post-metadata">

**Author:** ![A.RADIX](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@A.RADIX](https://forums.unrealengine.com/u/A.RADIX)\
**Post date:** [April 25, 2024, 7:44am UTC](https://forums.unrealengine.com/t/enable-logging-in-shipping-build-using-installed-builds/1805603/3 "2024-04-25T07:44:42Z")

</div>

I updated my previous post, to have only one and correct information. Because the previous version was incomplete.

---

<div class="post-metadata">

**Author:** ![frisbone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/frisbone/32/725191_2.png) [@frisbone](https://forums.unrealengine.com/u/frisbone)\
**Post date:** [April 28, 2024, 10:09am UTC](https://forums.unrealengine.com/t/enable-logging-in-shipping-build-using-installed-builds/1805603/4 "2024-04-28T10:09:08Z")

</div>

Thanks for updating this, I had forgotten about this question and came to some of the same conclusions in the interim.

---

<div class="post-metadata">

**Author:** ![A.RADIX](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@A.RADIX](https://forums.unrealengine.com/u/A.RADIX)\
**Post date:** [April 30, 2024, 8:09am UTC](https://forums.unrealengine.com/t/enable-logging-in-shipping-build-using-installed-builds/1805603/5 "2024-04-30T08:09:11Z")

</div>

Also, we can modify the log file name and destination if you start your app with a command line :  
`C:\Deployment\Package\Windows\Binaries\Win64\MyProject-Win64-Shipping.exe ABSLOG="C:\MyCustomLogFolderPath\MyCustomLogFile.log"`  
If you run your app with this param, your log is where you need it to be.  
This function in code source allow us to do it :

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/5/a/c5a2e333da465e186b78891e53051fe95f79fd7b.png)

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [May 30, 2024, 8:09am UTC](https://forums.unrealengine.com/t/enable-logging-in-shipping-build-using-installed-builds/1805603/6 "2024-05-30T08:09:38Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
