Daily Log
Daily Log
Daily Log is a plugin that automatically archives your server's log files based on configurable criteria. Other solutions currently exist, but Daily Log's goal is to make this task easy while doing the following:
- Prevent log files from getting too large
- Make it easier to manager the server log files
- Reduce the space required to store the logs by zip archiving them
- Quickly archive the log file while developing or testing plugins to start with a FRESH log file
Features
Archive log file with one or more options:
- At a configurable hour 0-23 each day [enabled in config by default for hour 0 (midnight)]
- Repeat archive every 1-24 hours [defaults to every 24 hours]
- When the log file reaches a configurable size [disabled in config by default]
- When the plugin is unloaded (ex server reboot) [disabled in config by default]
You can also archive the log file with the command /dlarchive in game or in the console
Optionally zip archived file [enabled in config by default - disable if you prefer plain text .log files in the archive folder]
You can specify in the config the number of days to keep archived log files
Configuration
- Place DailyLog.jar in your plugin folder and restart server.
- If upgrading from Beta version, delete the old config.yml file from the plugin folder.
- Edit config.yml in the plugins/DailyLog folder. The default config will archive the log file at hour 0 (midnight) and will zip the archive. The other options are disabled in the default config and must be enabled to use.
- After editing config.yml, use command /dlreload in game or in console to reload the config file
Commands
- /dlarchive - archive the server's log file immediately
- /dlreload - reload plugin's configuration
Permissions
- dailylog.dlarchive - Allows use of the /dlarchive archive command
- dailylog.dlreload - Allows use of the /dlreload reload command
Donations
- List of Donors
- xXTreePuncherXx - Server IP: mc.punchcraft.us
@deleted_8591593
Thanks for the feedback!
@yuihjk98
If you decide to give it a try, let me know how it works out for you! The most recent beta version has been approved. I have some more testing to do myself and then I'll upload a "Release" file. Thanks for the feedback :)
Confirming that this works exactly as expected. Wonderful, Thanks!
@mc247
Thank you!, Works like a charm now.
Hi! I haven't downloaded this, but I just want to say this is a brilliant idea for a plugin and I salute you from creating this. I encourage you to keep this plugin in development, as it could be a real hit. I will download this for my server soon, once your new build is approved.
@dead_fred
Thanks! I'd imagine most servers are running 1.6. I just uploaded a new jar file for JavaSE-1.6. Hopefully it does not take long to get approved. Please let me know if this works for you. Your feedback is appreciated.
I'm getting an error related to the version of java you compiled the plugin with (Unsupported major.minor version 51.0). I don't get this with any other plugins.
Btw I'm on java 1.6 Update 12
Success! DL created a zipped log in the archive folder at midnight.
@mc247
Sorry, my brain is closed since I'm on vacation starting tomorrow...
I read everything and still saw 5000 bytes instead of KB...
@GumbyDammit Awesome! But I removed the link myself as I didn't want anything to delay approval :)
The default max size is 5000kb or about 5mb.
SizeMax: Maximum Allowable Log Size in Kilobytes. Defaults to 5000 if sizeMax is invalid.
@mc247
Sweet. I grabbed your jar before the post was deleted, and it's running on my server right now. You might want to bump SizeMax to something larger than 5 KB. For instance, just starting my server creates an 85 KB log. My logs are roughly 1-2 MB daily.
@GumbyDammit
The archived logs are zipped by default.
@mc247
Bukkit staff will remove this link, I'm pretty sure.
If possible, could you also compress the archived logs for size?
@GumbyDammit
Understood and thanks for this input. There will be no removing of the logs/zip archives in the initial release. The plugin will just move them to the archive folder. That feature may be added later, but I really didn't want the plugin REMOVING the logs at this time. In my case, I plan on offloading these and keeping them for a LONG time. If/when this feature is added, I would store each archive in a sub folder by date, so there could be an unlimited number of archived logs for a date. I like this idea, but I'll save that for a future version.
@mc247
The problem with the previous logger I tried was thus: it let you define how many backups to keep and when to backup, but it would do a backup & wipe on a server restart. So, imagine you have it set to save a backup every 24 hours and you want to keep 5 days worth of logs. Then you need to debug a new plugin so you stop and restart the server 5 times in a 10 minute span. Guess what? Your previous 5 days worth of logs are gone and now you have 5 new logs of about 2 minutes each. If I have it set to archive every 24hrs, it should save only one log per day regardless of how many times I restarted the server. There may have to be some persistence management to do this but it isn't that hard.
@GumbyDammit
I have the option to archive when the plugin is unloaded and it appears to be working in my testing. The "new" log file contains all the plugins that unload AFTER this plugin, but for what I need that option for, I'm OK with that. I need this option because when testing other plugins, I like to start with a FRESH log file. I won't use this option on a LIVE server.
The "on unload" and "on size" archiving will default to FALSE in the config file. The default config file will only archive the file at midnight:
config.yml
Finally! I have been waiting forever for a good log archiver.
Please make sure that you don't archive the log on a restart. A previous log plugin I tried would save on restart, which would blow away your older "real" logs. It never got fixed, and the plugin was basically useless.