[Linux] Location for logs and UE4 environment vars

Hi,

Is it possible to change the default log directory using en environment variable?

It seems to create ~/Library/Logs/Unreal Engine/LocalBuildLogs/Cook.*.txt

but I’d like to put logs in a custom location, for archiving and monitoring.

*** Moreover, is there a listing of all the possible Linux environment vars that can be understood by UE4

Thanks!

That log location is specified in RunUAT.sh which is shared between Mac and Linux.

As for the env vars, there aren’t any relevant I remember of off the top of my head. Some third-party software (UELinuxNativeDialogs) has vars like LND_BACKEND, and SDL perhaps recognizes a bunch of vars, but we are not using them to control engine behavior in general, preferring commandline switches and .ini settings.

There’s a pending pull request on Unreal’s GitHub repository that makes Unreal write its logs into the more appropriate ~/.local directory:
https://github.com/EpicGames/UnrealEngine/pull/10138

Until it’s merged (if it gets merged), just replace the #run UAT section in your engine’s Engine/Build/BatchFiles/RunUAT.sh file with the section from the linked pull request and run the UnrealEditor binary file as usual - the change will be picked up automatically.

1 Like