karlheyes / icecast-kh

KH branch of icecast
GNU General Public License v2.0
298 stars 107 forks source link

Logs do not rotate #285

Closed radioboss closed 4 years ago

radioboss commented 4 years ago

Specifically, the "access.log" continues to grow. It works sometimes, but sometimes the logs appear to grow, while it should be split at 50KB. I'm not sure, but it seems that logs do not grow larger than 50MB.

Relevant config section: `

access.log
    <errorlog>error.log</errorlog>
    <loglevel>1</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
    <logsize>50</logsize> <!-- Max size of a logfile, KB -->
    <logarchive>1</logarchive>
</logging>`
karlheyes commented 4 years ago

looks like the setting of the trigger size was being skipped if below 500k. I have changed it to use 100k as the minimum size even if requested less. The 50Meg is the default if none is set.

karl

radioboss commented 4 years ago

Thank you for clarifying this. What's the point of the minimum size limit? Regular Icecast version allows any log size, so I don't think it makes any sence for KH edition to impose such a limitation.

karlheyes commented 4 years ago

imagine setting a 1k cycle, you would hardly get anything on that, probably involving more work to deal with the cycle. When I rewrote the log system for ic2, there were a whole bunch of things that were not put in place because most sites used large settings or used portals that did that for them. I don't think the xiph build uses a separate thread either but elimates possible stalling cases against certain IO systems. 100k is still fairly small for logging.

Note that the logs can be separately spec'd out eg

<errorlog>
    <name>error.log</name>
    <size>1000000</size>
</errorlog>

karl

radioboss commented 4 years ago

Thank you for clarification. 100K seems a reasonable size. It would also be a good idea to mention this in the docs somewhere. Do you plan on issuing a release with this change anytime soon?

Re log size limitation - I need logs to be rotated, that is to have all logs available as a set of files.

karlheyes commented 4 years ago

I'll do a kh14 in the next day or so. I think I've done what tidying needs to be done before then. Just need to make sure the windows side builds as expected.

karl