Increase time between log rotations

Server Version#: 1.18.8.2527
Player Version#: NA

I am wondering if there is a way to increase the time between log rotations or increase the amount of logs that are kept.

I have my current log files, then I have 5 rotated logs for each log source - but if I’m trying to look into an issue from last night, literally all of the logs are from today making this impossible.

Say I wanted to look back to 30 days of logs or even just a weeks worth, is it possible to have Plex keep that many logs? They aren’t large so I don’t see any issues with space.

My main problem I’m having, is users were trying to stream last night, the stream was direct play but they were encountering buffering (remote streams). I can’t view the logs from the time to determine what was causing a direct play buffer. I’ve encountered direct play buffering recently as well (local stream on LAN).
My server is fine, CPU barely reaches 50% use most of the time and bandwidth is nowhere near maxing out the gigabit connection.

My initial guess would be connection congestion on their end.

Make sure you’re not on Verbose. That setting overruns pretty quickly. You’ll get more data on Debug.

This support document describes how to change advanced, hidden server settings. One of these hidden settings is “LogNumFiles,” which controls the number of log files to retain (in addition to the current one). By raising this value, you can increase the amount of logging retained:

1 Like

@pshanew This I knew, but admittedly forgot about. Thank you for the reminder!

@CWallace I only ever have debugging enabled, unless I need verbose which is disabled when not required. It’d still be nice if you could set the log rotation to be daily so I have one file for each day. Each log is kb in size and the ones I just skimmed through are only 150-200 lines each so I feel like they’re being rotated needlessly.

I will increase the number of logs kept though, see if that makes a difference.

Thank you both for your input!

1 Like

No problem. I just had a look at a default Preferences.xml file on my system and LogNumFiles is not present; so you may need to add it manually.

I did have to add it manually, you’re correct. Thanks again! Hopefully having more log files will allow me to see further back.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.