SaveLog
SaveLog
SaveLog was requested by: jj3502 (Plugin Request topic) Does your host delete the log file for your server when it's stopped? Rather have your log be backed up when stopping? SaveLog has got your back! I know this plugin doesn't do much now nor is it really feature packed but maybe it will eventually. Depends on how the release goes :P
The default backup interval is 24 hours, which is stored in the configuration file in seconds (86400 seconds).
Commands
Command | Description |
---|---|
/savelog | Shows usage |
/savelog backupnow | Preforms a backup and clear |
/savelog clear | Only clears DOES NOT backup |
Permissions
Node | Default | Description |
---|---|---|
savelog.notify | OPs | Shows log backup / clear notifications |
savelog.backup | OPs | Allows in game, on demand, backup execution |
FAQ
- Where are the logs saved?
- Logs are saved in a folder under plugins/SaveLog/backups\
Requests + Bugs
Please report bugs to the issue tracker, otherwise I will probably never look at it.. Post in the comments and I'll delete it! If your not smart enough, or intelligent enough to read this and follow this simple direction then I don't really want to help you.
Please submit FEATURES in the comments or PM me (prefer comments so we don't end up with duplicate requests)
Recent Changes + Notes
I think the interval has been fixed. My friend here did the code changes that should hopefully fix your issue. I'm working on how to allow you guys to do custom file name patterns.
@App1eGenius93
Hey, no problem. It's not like we're in a position to complain ;)
Yes, I'm here sorry guys. I forgot to post a response. I'm a little overwhelmed with some things. I'm sorry @GumbyDammit for not replying. I did read it. I am trying to play catch up with a bunch of stuff right now I'm sorry everyone.
Great plugin. One thing I would like to see is the ability to specify other logs. I have some plugins that also create logs, would love to able to use this to rotate them as well.
Hello, anybody home? ;)
@App1eGenius93
Sure. The way your plugin works now is that when the server is restarted, the log is saved away and wiped clean. If you restart the server several times, you add more and more small logs to the list. Once you reach the number of backups defined by config's BackupsToSave, it starts deleting the old ones to make room for the new ones. That means that 5 restarts in a row can wipe away 5 previous log files and the valuable data in them. I'm suggesting that you change the logic so that the plugin only performs one backup & wipe per day, regardless of how many times the server is restarted. If the user has the config set to backup every 24 hours, each log should contain exactly 24 hours worth of data.
@GumbyDammit
I'm slightly confused into what your asking? Could you try explaining it again please?
It's working well so far. I have another idea for an improvement, however. I think it might be better to not backup & wipe the log on every server restart. This solves the problem of having all your backups pushed off by restarts. For example, if I have 5 days worth of backup logs and then restart my server 5 times in a row, all the old logs are gone and replaced by the tiny logs of the restarts. Perhaps, instead of having an elapsed time in seconds between backups (which get overridden by a restart anyway), you could have a backup time config entry that does a backup & wipe at the same time every day.
@App1eGenius93
Thank you very much for your efforts. There isn't a good log handler out there as far as I know.
@GumbyDammit
Found and fixed. Waiting for approval. Please let me know about the interval and let me know if that works as expected now.
@App1eGenius93
Of course. I never make config changes while the server is running. Try it yourself and see.
@GumbyDammit
Did you try changing the config file when the server wasn't running?
@GumbyDammit
I'll look into that!
Hi everyone, testing out new build this week that should fix the reported problems. I'll let you know this weekend.
Sorry everyone. I didn't notice any messages on the plugin. I'll get to all your inquires tonight if I can.
If not, tomorrow then :D
@bobberto7
Well, it would be a good solution if the plugin didn't revert any changes you make to config.yml when it starts. I wanted 7 backups every 24 hours and set my config options accordingly, 7 and 86400. When I restarted the server, it was back to 5 and 1440.
@GumbyDammit yes that will work out great
I've posted a ticket but just to let anyone else know:
There seems to be a bug that makes the log get saved every 24 minutes instead of 24 hours. You can either wait for a fix or change your BackupInterval from 1440 to 86400.
@bobberto7
Or provide variables so you can construct your preferred naming scheme:
%s - Server Name, %y - Year, %m - Month %d - Day, %t - Time
could make so it will save the server log as server{date}{time}.log
examples: server1/3/13.log or server1/3/2013.log
Nice. I've been waiting for a plugin like this.
Feature request: a config option set by the user that tells SaveLog to compress the log using a format such as zip or 7zip