Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google Log In with Steam Sign In
  • Create Account
Photo

server.log auto-cleanup feature


  • Please log in to reply
5 replies to this topic

#1
OFFLINE   carv

carv

    Member

  • Members
  • PipPip
  • 28 posts
3
A step in the right direction
  • Locationmostly in the 3rd planet from the sun
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.

#2
OFFLINE   clan DIABOLIK

clan DIABOLIK

    Advanced Member

  • Members
  • PipPipPipPip
  • 322 posts
36
Getting Better
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.

#3
OFFLINE   carv

carv

    Member

  • Members
  • PipPip
  • 28 posts
3
A step in the right direction
  • Locationmostly in the 3rd planet from the sun
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!

#4
OFFLINE   wajdzik

wajdzik

    Member

  • Members
  • PipPip
  • 24 posts
1
A step in the right direction
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.

#5
OFFLINE   Sol

Sol

    Regular Member

  • Coders
  • PipPipPip
  • 113 posts
28
On a distinguished road
  • LocationPoland
if os.time() == timetodelete then
   os.execute("rm silent/serverlog.log") -- rly i dunno working dir
end
Just simple idea.

Edited by sol, 15 January 2012 - 05:33 PM.


#6
OFFLINE   Sol

Sol

    Regular Member

  • Coders
  • PipPipPip
  • 113 posts
28
On a distinguished road
  • LocationPoland
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





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users