carv Posted January 14, 2012 Share Posted January 14, 2012 I looked in the documentation but I could not find if there is a way to make the server.log file auto- clean up or purge itself every so often. I am not sure if this is a cvar setting but i did find that g_logs is not included in the documentation nor on the wiki. unless i am blind which is entirely possible. My server.log file is at 29MBytes and am just curious if i have to purge it manually or if there is a mechanism in place to take care of it. For that fact i did not see anything similar to that for admin.log nor cheat.log but these two are so much smaller than server.log. I see where i can use g_logOption to define paramaters to include or exclude but that is it. Quote Link to comment Share on other sites More sharing options...
clan DIABOLIK Posted January 14, 2012 Share Posted January 14, 2012 I think I can answer: you can suppress server.log when server is running, it had never damage anything on my server, and I do it about once a week. Quote Link to comment Share on other sites More sharing options...
carv Posted January 14, 2012 Author Share Posted January 14, 2012 I can do that. i'Il delete it every so often. I was just not sure if there was a way to automatically clean it up or keep the latest 7 days of data or restrict the size to a certain limit. Thanks Blackops! Quote Link to comment Share on other sites More sharing options...
wajdzik Posted January 15, 2012 Share Posted January 15, 2012 Better way would be making new serwer log after one week/month and old serwer log save as xxserver.log (number of month/week where xx is). I'm doing this manualy on my serwer 'couse sometimes i need check some things from last month in server log and i need backups of old log's file. Quote Link to comment Share on other sites More sharing options...
Sol Posted January 15, 2012 Share Posted January 15, 2012 (edited) if os.time() == timetodelete then os.execute("rm silent/serverlog.log") -- rly i dunno working dir end Just simple idea. Edited January 15, 2012 by sol Quote Link to comment Share on other sites More sharing options...
Sol Posted January 15, 2012 Share Posted January 15, 2012 For Example: -- Sol (www.polish-frags.pl) logname = "serverlog.log" data = "12:00:00" - rm log every day at 12:00 function et_RunFrame( levelTime ) if string.find(os.date(), data) ~= nil then if et.HOSTARCH == "UNIX" then os.execute(string.format("rm %s/%s/%s",tostring(et.trap_Cvar_Get("fs_homepath")),tostring(et.trap_Cvar_Get("fs_game")),logname)) elseif et.HOSTARCH == "WIN32" then os.execute(string.format("DEL %s/%s/%s",tostring(et.trap_Cvar_Get("fs_homepath")),tostring(et.trap_Cvar_Get("fs_game")),logname)) end end end gaoesa 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.