Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Enable output logs for Shipping Build

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?

Product Version: UE 4.20
more ▼

asked Dec 20 '18 at 04:57 PM in Packaging & Deployment

avatar image

65 7 9 11

avatar image spreiste Feb 19 '19 at 12:35 PM

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

avatar image spreiste Feb 19 '19 at 12:51 PM

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

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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.

more ▼

answered Feb 23 '19 at 08:26 PM

avatar image

65 7 9 11

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question