adamrehn / ue4cli

Command-line interface for Unreal Engine 4
https://docs.adamrehn.com/ue4cli/
MIT License
249 stars 45 forks source link

Duplicate log from `ue4 run` command #54

Closed Zaratusa closed 3 months ago

Zaratusa commented 1 year ago

Hi, I'm using a custom 4.27.2 installed build on Linux. When I execute the ue4 run command to run a commandlet most logs are duplicated, see this example:

[2023.05.13-00.10.37:589][  0]LogHAL: Linux SourceCodeAccessSettings: NullSourceCodeAccessor
[2023.05.13-00.10.37:589][  0]LogHAL: Linux SourceCodeAccessSettings: NullSourceCodeAccessor
[2023.05.13-00.11.10:468][  0]LogUObjectArray: 18576 objects as part of root set at end of initial load.
[2023.05.13-00.11.10:468][  0]LogUObjectArray: 18576 objects as part of root set at end of initial load.
[2023.05.13-00.11.10:468][  0]LogUObjectAllocator: 5195368 out of 0 bytes used by permanent object pool.
[2023.05.13-00.11.10:468][  0]LogUObjectAllocator: 5195368 out of 0 bytes used by permanent object pool.
[2023.05.13-00.11.10:468][  0]LogUObjectArray: CloseDisregardForGC: 0/0 objects in disregard for GC pool
[2023.05.13-00.11.10:468][  0]LogUObjectArray: CloseDisregardForGC: 0/0 objects in disregard for GC pool
[2023.05.13-00.11.10:469][  0]LogEngine: Initializing Engine...
[2023.05.13-00.11.10:470][  0]LogStats: UGameplayTagsManager::InitializeManager -  0.000 s
[2023.05.13-00.11.13:102][  0]LogAIModule: Creating AISystem for world Untitled

I think this is caused by either of the additional parameters -stdout or -FullStdOutLogOutput.

sleeptightAnsiC commented 3 months ago

Tried few things but this simply does not occur on my side - Linux UE5.3.2 If that's a problem with ue4cli, then there should be more log entries that are duplicated, not only few of them.

Though, it would be nice to disable -stdout and -FullStdOutLogOutput Currently, most commands put them by default and there is no way to avoid that.

adamrehn commented 3 months ago

Ah yes, I remember this bug. This was a known upstream issue in Unreal Engine 4.x, which was subsequently fixed in the early days of Unreal Engine 5. I can't find the specific commit that fixed it, but for memory it was somewhere around the release of Unreal Engine 5.0 or 5.1.

@sleeptightAnsiC regarding the unconditional use of -stdout and -FullStdOutLogOutput: these flags are required in order to get full log output under Windows, so they're used everywhere that the Editor is invoked to ensure that no log output is missing.