PDA

View Full Version : Appending Log files for stats


Draconis
11-21-2002, 06:56 PM
How would you append the qconsole.log file and have it not reset the file everytime the server restarts??

Thanks

Green_Falcon
12-05-2002, 07:18 PM
Hey to my knowlege you can not get it to write over the qconsole.log, but you can make a back up of that file on your drive. by the way how do you get the qconsole.log to output the kills, suicides etc that are required for doing stats? i would really appricate it if you could tell me the settings
Green Falcon

Shockwave
12-06-2002, 08:46 AM
Supposedly, the way to get the log file to be appended instead of overwritten is to have this cvar set:

logfile 3

I have never been able to get it to work. It always overwrites my log file regardless. I have been told the settings for this cvar are as follows:

o = none
1 = buffered
2 = continuous
3 = append


One solution to your problem that comes to mind would be to make the stats program look at a copy of the server log file rather than the original. This way, each time the server restarts, you can have your script append the exisiting log file data to it before it is lost. Let's assume that you are in the directory where the log file resides and that you are using the default name. Here is a code snippet that will work for Windows:

type qconsole.log >> stats.log

This will take the contents of qconsole.log and append them to the end of a file named stats.log. Under Linux, the command would be something like this:

cat qconsole.log >> stats.log

Just put this line in your server startup script prior to the command that launches the server.

Regarding getting kill/death information to appear in the server log, this is what you need to have set:

developer 2

If you want to record player chat, you'll need this too:

sv_chatter 1

I hope this helps.