[cod] Log file rotation
info at valuegaming.com
Tue Jan 27 17:53:04 EST 2004
Hmmmm. With or without logsync, a map_restart / map_rotate always
refreshes the file handle. I can delete the games_mp.log and a
map_restart will cause it to be recreated.
I guess it would be possible to write a cron script to use rcon to
change g_log to a different filename, and if next time it runs, it
detects that a file with the new file name exists, it can rotate out the
There should be a better way of doing this though.... :-/
Josh Wright wrote:
>You'll need logsync set to 1 for this to work. Otherwise it only writes
>the log at every map_rotate (and writes it slowly for the first few
>minutes of the new map to avoid lag I guess).
>It can be used in the cfg file or from the command line.
>set g_logsync "1"
>From: VG Ops [mailto:info at valuegaming.com]
>Sent: Tuesday, January 27, 2004 9:56 AM
>To: cod at icculus.org
>Subject: [cod] Log file rotation
>Has anyone had any problems with setting up log file rotation. If find
>that if I move the games_mp.log file (to say games_mp.1.gz) then CoD
>does not start a new games_mp.log and wont write to an empty
>games_mp.log put in its place (a touched file). In fact, the only way I
>seem able to get cod to start writing to the log is to restart the
>Ideally I'd like to rotate the logs every hour as part of a cron job
>which also updates the mohstats (I don't want mohstats to keep reading
>the same data in the file and create duplicate entries in the stats).
More information about the Cod