How do I output to stdout when calling editor from command line?

I have UE4Editor.exe running tests in a Jenkins step.

How do I get the log to output on stdout instead of a file or a separate console?

-log puts it in a console window or lets me put it in a file, but that’s not helpful for this case.

1 Like

As far as I can tell there is no way to do this directly.

I had to write to a file using -log=Test.log then use type Saved\Logs\Test.log to send it to stdout.

This is a little late, but I got here first when searching in Google, so hoping to help others find the answer more quickly. You can pass -stdout as an argument to UE4Editor-Cmd.exe instead of -log and outputting the file - not sure why this is not a documented option, but I have successfully used it to get automated tests with the editor to log to standard out and hence to Jenkins.

7 Likes

I’m even later, but this solution only works for me when I pass both the -log and -stdout flags to my game’s executable when I run it from powershell (i.e. if I call MyUnrealGame.exe -log -stdout). Then, a separate terminal window opens up with a live feed of my game’s console logs.

But if I pass only the-stdout flag to the exe, nothing happens and I don’t get to see any console logs.

But thanks for teaching me about these flags @Arukhan :smiley:

I’m using Unreal Engine 5.2, my project’s build type is “Development” and I’m running powershell inside the Windows Terminal in case anyone may find that information relevant.