Wowza Community

retention of logs

Hello,

how do to set the retention of logs in Wowza.

Need keep only the last 5 logs.

Is it possible?

Thanks !

Hi,

If using unix/linux you could try to configure a cron job using tmpwatch.

Most Linux systems have a tmpwatch cron job that cleans up the /tmp directory. You can add another that monitors your logging directory and deletes files over 7 days old.

If you are using a different system, there are probably equivalent utilities.

You can also roll the logs in WOwza using date/time and size, see this article.

Daren

I’m not sure log4j provides a mechanism within the DailyRollingFileAppender to specify the number of logs to keep before removing. You can alter the dateformat within it. You may be able to use the org.apache.log4j.RollingFileAppender in conjunction with MaxBackupIndex property.

Alternatively you could manage this externally to log4j and run a cron script to remove older log files.

Thanks,

Matt