Don't rename the log file before rotation
There are no renaming currently. The files are created with correct dates and never renamed.
What you suggest is "renaming" and this makes things unnecessary complex.
Currently:
- when a new log-entry must be written the file name is generated based on current date and the text is written there;
- periodically and on program start the existing files on disk are checked (their file names) and removed if necessary.
With your suggestion:
- before writing into the file the program must know if it should rename the existing "nzbget.log" first. For that it needs to know from what dates the entries are in the file. When the program is started it would need to read the log-file and parse it to determine that date;
- when the program is running it could store the date of the last written entry; that would eliminate the need of reading the file but this is not always safe: the system date could be changed by user or another program instance could have written into file, for example when a command was sent via terminal (like "nzbget -P").
Considering the fact that the log-file is intended for rare troubleshootings as opposed to everyday use this improvement isn't worth the trouble. If you still need to read the file often write a small script which will "cat" from the most recent file (or sort file names).
Don't forget about w
eb-interface -> tab "History" -> open item details -> button "Log".