SRCDS Steam group


Rename console.log
#1
I've enabled the -condebug and I'm looking to rename my console.log daily for each reset to keep a history of logs. I know I am able to set log srcds console to a file using something like
-consolelog console-$(date +%F_%H-%M-%S).log

Is it possible to do this with the server console -condebug?
Reply
#2
I figured it out for anyone interested. The solution is to add the following line to srcds_run inside the run() [line 333] function.

mv /home/container/garrysmod/console.log /home/container/garrysmod/consolelogs/console-$(date +%F_%H-%M-%S).log

this moves the file "console.log" to a folder called "consolelogs" and renames it to the date and time it was generated. Before a new console.log is generated each time the server boots up, the previous log will be moved. This is good if your server resets, crashes, or completely explodes you will still have logs stored.

You will need to create the folder consolelogs inside your server's garrysmod folder. The logs will not be saved if the folder is not there.
You must set -condebug in startup to generate the console.log file.
Reply
#3
I'd sniff glitter if it'd help me feel something real house cleaning services near me
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)