We are gaining space

Development assistance and tutorials here.
Post Reply
Nelsona
Posts: 1728
Joined: Sat Sep 30, 2017 5:03 am

We are gaining space

Post by Nelsona »

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:

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
which might look like this:

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
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.
UncodeX Stuff
Not often maintained
My UT Mapping works...
Learn the rules like a pro, so you can break them like an artist.
- Pablo Picasso -
Post Reply