GAMEBotLand / scumlogs

g-portal logs downloader for scum servers
https://gamebotland.com
MIT License
13 stars 14 forks source link

Logs rotating 4 times a day #1

Closed G-Dolan closed 4 years ago

G-Dolan commented 4 years ago

Hi,

I know it's a g-portal/scum issue but the logs currently rotate 4-5 times a day, eg.

[11:29:25] creating admin_20190829050105.log [11:29:25] creating admin_20190829110057.log [11:29:26] creating admin_20190829170057.log [11:29:26] creating admin_20190829182424.log [11:29:26] creating admin_20190829230102.log [11:29:27] creating admin_20190830050101.log

Is there any way of having scumlogs dump all the output into a single file? My plan is to just watch this file and curl post the latest entries into discord but it's tricky while the filename changes so often and with no consistent naming/date or time convention.

Love this project btw!

Cheers

GAMEBotLand commented 4 years ago

Log rotates every time server restart. You can modify script to write to one file of every type.

change this line: filename = configini['folder'] + id with: filename = configini['folder'] + type

G-Dolan commented 4 years ago

Yeah I ended up just doing a tail -F on admin_* and doing a while read line and posting that to a discord webhook, it's working nicely, thanks though, might make the change as it means my server will have to watch less files!