Can you help me ? My issue is not the error itself (I can revert it), my issue is that I really need the logs for my packaged .exe (ideally packaged from editor)
I have installed the plugin, change the build settings and performed the proper imports. But when I try to perform (runtime, I manage to build the code)
#include <GLSMacroses.h>
...
if (GetWorld())
{
GLS_LOG_STRING(GetWorld(), LogTemp, Warning, TEXT("Direct log entry without formatting"));
}
else
{
UE_LOG(LogTemp, Warning, TEXT(" WORLD EMPTY "));
}
I get a EXCEPTION_ACCESS_VIOLATION for GLS_LOG_STRING (Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:650).
If someone can help me with that it would help me.
Ok I can now use GLS with my shipping.exe. I can copy the log from the overlay log and use it. Unfortunately I was not able to pinpoint any default location for the logs so I can only use the copy logs buttons from the overlay.
Quickly here is my solution (useful if you wish logs via GLS overlay in your shipping.exe):
Use GLS_LOG instead of UE_LOG. FString Message = TEXT("Hourra!"); GLS_LOG(this, LogTemp, Warning, TEXT("GLS IS WORKING: %s"), *Message); //GLS_LOG_STRING(this, LogTemp, Verbose, TEXT("Direct log entry without formatting"));
Build your project.
Package your project.
In your game, go in game (on my side I needed to left my main menu). Press alt+shift+g AND HOLD 1 second (holding is important, I was not holding long enough at first).
You should now have access to GLS log.
Here are additional steps I took but I think they were useless with this solution (I share them just in case it might had have an impact)
In Packaging settings… I have ‘Include Debug Files in Shipping Builds’
In my build.cs, I added PublicDefinitions.Add("UE_BUILD_SHIPPING=1"); PublicDefinitions.Add("ALLOW_CONSOLE=1"); PublicDefinitions.Add("USE_LOGGING_IN_SHIPPING=1");
I also added (DefaultGame.ini under [/Script/GLS.GLSSettings] that you get when installing the plugin and saving a conf as default)
`
[Core.Log]
LogInit=Verbose
LogWarning=Verbose
LogError=Verbose
LogPerformance=Verbose
`
I will close it as the solution. Even though I am really surprise it is that complicated to activate logs for shipping configuration (I know this is for performance but we should have the option to choose).
If anyone using a similar approach found GLS log location, please tell me. Paying for such a need feels ridiculous, I was starting to consider simply adding some code to write to a file instead
It was specifically designed to handle logging tasks in builds of any configuration. The issues you encountered have given us valuable insights, and we’ll definitely work on improving the plugin to make it even simpler and more convenient to use in future updates.
We truly appreciate your feedback and the effort you’ve put into solving the challenges you faced. If you have more thoughts or suggestions, don’t hesitate to share them—we’re always open to making things better!
Unreal Engine intentionally disables logging in shipping builds. This is because all builds delivered to marketplaces for end users must have logging disabled to ensure maximum performance of the game.
In professional studios, it’s common to use engine builds compiled from source, which can be downloaded from Epic Games’ GitHub repository. By using a source-built engine, you can build your game in the TEST configuration, which allows logging functionality. Additionally, the source engine can be modified to enable logging in the shipping configuration, if necessary.
However, it’s crucial to remember that any build submitted to a marketplace must have logging disabled.
For example, in GLS, there is a build flag -gls_disable. If this flag is passed when building the project, GLS will be completely disabled and unavailable in the build, even if you’ve enabled logging for the shipping configuration in the .ini file.
We hope this clarifies the situation! If you have any further questions, feel free to ask.