Quote:
Originally Posted by wickedd
Well you are wrong. It will log everything that's in the console.
|
Well, you are wrong. Check it out for yourself. "log on" logs only specific messages, that use logging functions. Just make a plugin that issues "server_print" and that won't get logged. A lot of errors also won't get logged with that command.
As a simple proof:
Type
echo text message not visible in the logs in the server console.
It will echo the text in the console but it will NOT be logged.
@HamletEagle:
That's not enough, there are other functions (some that display errors) used for printing to the console.
@Depresie:
I was also interested in something like this and these are the solutions I found:
1)
condebug
To start logging to a file called hlds/cstrike/qconsole.log (linux) or hlds/qconsole.log
a) Add condebug your server.cfg
b) Add -condebug to your command line parameters. Also if your sever is hosted somewhere and you can't directly edit the start parameters, you should have an input in the server Control Panel where you can choose the startup map, there you can inject parameters for the command line like so:
This way the new command line would be ./hlds_run -game cstrike +map
de_dust2 -condebug
This will log almost everything (99.99% of everything in the console, and about 95% of all the possible errors I've encountered)
2)
PIPE
If you have the ability to change the command line (like in
2) b)) you could force the console to be piped to a file with something like this:
This will log 99.9999% of the console messages. (I'm just subtracting 0.0001 in case I miss something)
*The possible downside for this option is that you might break some of the Control Panel functionality that depends on piping the console output.
3)
ORPHEU HOOKING
You could search all the functions that output content to the console and hook them. But I think this will take too much work and it won't be 100% reliable.
4)
ACTIVE MONITORING
IF you have the console output in the Control Panel:
Use an external server to query the Game Server every x seconds.
When it doesn't respond make a curl request (with the login cookies) to the Control Panel to get the output of the console and save the contents of the console to the external server.
*This is the best way in my opinion because it's functionality doesn't depend on the game server, because it's run independently, but it's complicated to implement. I also have it setup to e-mail me when it crashes.