lisdude / toaststunt

A network accessible, multi-user, programmable, interactive system for the creation of LambdaMOO style MOOs / MUDs.
63 stars 27 forks source link

more of a suggestion #9

Closed NathanTech7713 closed 5 years ago

NathanTech7713 commented 5 years ago

Wasn't sure where to put this, and if this isn't the place let me know. Is there a way the server could have a size check implemented for its logger? So if size of log exceeds $server_options.max_log_size, then close it, zip it up, and open a fresh file, repeat as necessary? I'm not sure if the mud closes the database.log file after writing to it off the top of my head, and part of me wants to say it doesn't, which is why I am pretty sure having an external program do this would be a veryveryvery bad idea. Thanks for your time and attention to this matter.

lisdude commented 5 years ago

Commit 5ba0963a12a72c21ec92f045468394d4e21122b3 should address this. You'll need to write a script to do the file size checking and zipping. From there it can either delete or move the old file and then send a kill SIGUSR1 <pid> to the server to re-open a new logfile under the old name.

Pretty minimal testing, so hopefully it works out!