Jump to content

Log Rotation Options - Utilize logrotate instead of built-in rotation


Harbinger1080

Recommended Posts

Harbinger1080

In order to be more in line with other applications, and to improve compatibility with common utilities such as fail2ban, an option should be added to utilize logrotate instead of the built-in log rotation.

 

Logrotate can take a standard log file name, and rollover on a schedule configured by the administrator, compress, and purge as specified.  This also work well with utilities, such as fail2ban, that can greatly improve security of an exposed application like Emby.

  • Like 2
Link to comment
Share on other sites

Harbinger1080

It would be preferable, yes.  An option to disable built in rotation and use my own would work great, I think.  People who don't want to fiddle could still have the workable solution you've already got, and other users could have a little more control and flexibility.

Link to comment
Share on other sites

This sort of thing would probably be left as a hidden config switch because otherwise we'll have to troubleshoot users that toggle it for no reason and then complain about a 10gb log file.

Link to comment
Share on other sites

mastrmind11

Even if you left the existing built-in rotation intact, simply changing the name of the current log file from server-234523452345.txt to just server.txt would fix the fail2ban issue.  Just append the date/time to server.txt when you roll the file.

 

edit:  Doing this would also make finding the current log file easier, w/o having to sort the files by time in order to find the most recent.

Edited by mastrmind11
  • Like 1
Link to comment
Share on other sites

dcrdev

+1 for this

 

Although I rely on Apache (proxy) logs for fail2ban - I utilise the logrotate facility quite extensively to compress and move log files around; sadly emby doesn't play nice with this because of the built in log rotator.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...