Jump to content

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


Recommended Posts

Harbinger1080
Posted

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
Posted

Hi, so basically you want to disable the built in log rotation and setup your own?

Harbinger1080
Posted

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.

Posted

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.

Harbinger1080
Posted

Hah, this is true.

mastrmind11
Posted (edited)

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
Posted

+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
Posted

Ok so maybe that standard behavior would be better than an option.

  • Like 2

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...