We are gaining space
Posted: Sat Nov 09, 2019 8:34 am
In the server startup batch I think we can implement a few lines which at startup or crash of the server automatically compress the logs in LZMA format accepted by any XCGE server and which usually has 2-3% of the original file length.
Then we have the old batch:
which might look like this:
I will test this strategy in my private environment to see how it works. This way we reduce the space consumed with logs and we can store even more if we have to. LZMA logs can be opened with the free 7zip archiving tool any time.
Then we have the old batch:
Code: Select all
@echo off
Echo Starting Evil Sniper XC Server...
Echo Preparing variables for Logging TimeStamp...
:10
Call Oops.bat
Copy server.log ..\Logs\SniperLog_%TodayDate%_H%Hour%_M%Minute%.txt
echo UCC2 server UT-Logo-Map.unr?Game=BotPack.DeathMatchPlus?Mutator=MapVoteULv2_1NS.BDBMapVote,LessTele3.LessTele,Starter.TheStart?Difficulty=2 port=8555 -log=Server.log -ini=UnrealTournament.ini -readini=UnrealTournament.ini
exec_hof XC_Core.XC_ServerCommandlet ?Difficulty=3 port=7797 -log=Server.log -ini=UnrealTournament.ini
Echo ...........................
Call Oops.bat
Echo Saving CrashLog with TimeStamp
Copy server.log ..\CrashLogs\SniperCrash_%TodayDate%_H%Hour%_M%Minute%.txt
Copy server.log servercrash.log
GoTo 10
Code: Select all
@echo off
Echo Starting Evil Sniper XC Server...
Echo Preparing variables for Logging TimeStamp...
:10
Call Oops.bat
Copy server.log ..\Logs\SniperLog_%TodayDate%_H%Hour%_M%Minute%.txt
exec_hof lzmacompress ..\Logs\*.txt
del ..\Logs\*.txt /Q
echo UCC2 server UT-Logo-Map.unr?Game=BotPack.DeathMatchPlus?Mutator=MapVoteULv2_1NS.BDBMapVote,LessTele3.LessTele,Starter.TheStart?Difficulty=2 port=8555 -log=Server.log -ini=UnrealTournament.ini -readini=UnrealTournament.ini
exec_hof XC_Core.XC_ServerCommandlet ?Difficulty=3 port=7797 -log=Server.log -ini=UnrealTournament.ini
Echo ...........................
Call Oops.bat
Echo Saving CrashLog with TimeStamp
Copy server.log ..\CrashLogs\SniperCrash_%TodayDate%_H%Hour%_M%Minute%.txt
Copy server.log servercrash.log
exec_hof lzmacompress ..\CrashLogs\*.txt
del ..\CrashLogs\*.txt /Q
GoTo 10