Command-line options (-LOG= / -ABSLOG=) . Log not saved

Hi there

I’ve been learning about the different logging command line options. I found -ABSLOG=

Anyway, all I really wanted was to save my logs to a file each time I ran the game from command-line (actually I am using Powershell).

PS C:\Users\DesignDemon> & "C:\Program Files\Epic Games\UE_4.27\Engine\Binaries\Win64\UE4Editor.exe" 
"C:\Users\DesignDemon\Documents\Unreal Projects\3_Steam_Multiplayer-master\UnrealProject\PuzzlePlatforms\PuzzlePlatforms.uproject" 
-game -log -ABSLOG='C:/mylog.txt'

So I tried the command above. But no matter what I put as the path it never gets saved. Also I tried just -LOG and checked in all the relevant folders (ie. The folder where I opened Powershell, The project folder and the UE4 folder) but I couldn’t find my actual log.

The problem is I am opening two instances of the game from Powershell. There is no ‘Build’ folder in my project currently.

Hoping someone can help d:)

1 Like

The root of C drive is usually protected and normally you can’t have applications write to that folder. Run the powershell console as an admin and this will probably solve the issue. The other option is to create a folder called logs and change your path to c:\logs\log1.txt and so on, 1 for each instance. This may solve the issue.

1 Like

Thanks Beegeedee. I had actually already tried the folder such as “C:\Logs\logs.txt” but it didn’t work. I also tried it as Admin. See the result:

PS C:\> $currentPrincipal = New-Object Security.Principal.WindowsPrincipal
([Security.Principal.WindowsIdentity]::GetCurrent())
>> $currentPrincipal.IsInRole
([Security.Principal.WindowsBuiltInRole]::Administrator)
True
PS C:\> & "C:\Program Files\Epic Games\UE_4.27\Engine\Binaries\Win64\UE4Editor.exe" "C:\Users\DesignDemon\Documents\Unreal Projects\3_Steam_Multiplayer-master\UnrealProject\PuzzlePlatforms\PuzzlePlatforms.uproject" -game -log=log.txt
PS C:\> ii log.txt                                                                                                      

ii : Cannot find path 'C:\log.txt' because it does not exist.

However luckily I did find the default log location is ProjectFolder/Saved/Logs/ and this has …log1, log2 etc. So in the end I don’t need to worry so much right now about writing my own log file and location.

Thanks

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms