PDA

View Full Version : PLEASE Explain g_log, g_logsync, &logfile


Aslan
01/23/01, 01:54 pm
Alright, the new Q3 logging is driving me crazy on my linux Q3 server.

I have played with the following (which I have not found a full and accurate explaination of anywhere so far):

seta g_log "test.log"
seta g_logSync "1"
seta logfile "3"

I have played with various combinations and the results are frustratingly weird.

Here are my observations so far:

logfile - works somewhat like the old quake/quake2 logfile command in that it creates a file called qconsole.log. However the silly game creates it under the .q3a directory instead of where you would expect: the baseq3 dir. It also screws up logging of multiple games using the baseq3 dll.

g_log - supposed to let you define a filename that logging will subsequently go to. I have only gotten this to work if I manually create the file first, then Q3 will fill it. And I cannot get this to work every time.

g_logsync - I have no idea what this is really supposed to do.

games.log - I get one of these even if I turn off all three of the log commands. It seems to only record the server config loaded at each map change.

BTW, I have emptied out my q3config.cfg file in .q3a and changed it to read only to prevent that q3config from overwriting my variable declarations in my server config file (which is executed via command line).

Would someone PLEASE explain the proper implementation of logging under Linux Q3A and point me in the direction of a good log file parser?

Also - is there any way to turn off logging of item pickups? That makes one evening's log file grow to several MB and I could not care less who is picking up what. BTW, this also applies to looking at the console screen - those damn item pickups make it hard to follow text from player's say commands in real time. It is almost impossible to talk to a player real time from the console because of the item pickups.

Thanks,
Aslan

Aslan
01/23/01, 02:54 pm
Ok, I answered my own question.

g_log can indeed define a unique console log file for your server. The trick is that the file does not start getting written to until the first map change after the server is started.

Put:

set g_log "server1console.log"
set g_logsync "1"

In your server's config file

Then start the server and immediately execute a mapchange with the vstr command (assuming here you do rotation like suggested in the gameadmins setup guides).

the file "server1console.log" will be created in the .q3a directory and start to fill real time with all console text.

If you run multiple servers from baseq3, no sweat, just put a unique console logfile name in that server's config file:

set g_log "server2console.log"
set g_logsync "1"

and fire up the second server and execute a vstr to change the map. You will now have BOTH server1console.log and server2console.log filling up real time in .q3a with their respective server's console text.

You will still get a games.log file, but from what I see it only logs the server config variables at each map change and nothing else.

BTW, setting logfile "0/1/2/3" will do just like old quake/quake2 and create a file called qconsole.log in .q3a, but that is of limited use since you have no control of the name and the file contains nothing different from the uniquely named log files produced by g_log.

Aslan

the_taurus
09/17/01, 07:44 am
hmmm
the
seta logfile "3" is for appending i.e. continueing logs. yes.
But
'console log'?
is this the regular file called games.log
or is it a log that 'logs' server side events
e.i.
serversettings?

and
the command
log_sync "1" how does this work?
is it:
allow the 'master' log-file to be synched?
or is it client side or ..
what I mean is this;
How do I set my client up so it is synchronized with the server log?
can this be done?

PLZ advice