# Automatic purging of log files with WowzaDailyRollingFileAppender

**URL:** https://community.wowza.com/t/automatic-purging-of-log-files-with-wowzadailyrollingfileappender/55205
**Category:** Wowza Streaming Engine
**Created:** [May 19, 2020, 2:14pm UTC](https://community.wowza.com/t/automatic-purging-of-log-files-with-wowzadailyrollingfileappender/55205 "2020-05-19T14:14:28Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Michael\_Reul1](https://avatars.discourse-cdn.com/v4/letter/m/f05b48/32.png) [@Michael\_Reul1](https://community.wowza.com/u/Michael_Reul1)
#### Post date: [May 19, 2020, 2:14pm UTC](https://community.wowza.com/t/automatic-purging-of-log-files-with-wowzadailyrollingfileappender/55205/1 "2020-05-19T14:14:28Z")

</div>

Hello,

is there finally a built-in way to purge old log files with the WowzaDailyRollingFileAppender? There is no option to do this in the documentation and “log4j.appender.serverAccess.MaxBackupIndex=20” does not work with WowzaDailyRollingFileAppender.

Does everyone still has to write an external cron job / logrotate script to do this simple job?

Kind regards  
Ingo

---

<div class="post-metadata">

### Author: ![video\_streaming](https://avatars.discourse-cdn.com/v4/letter/v/22d042/32.png) [@video\_streaming](https://community.wowza.com/u/video_streaming)
#### Post date: [May 19, 2020, 6:53pm UTC](https://community.wowza.com/t/automatic-purging-of-log-files-with-wowzadailyrollingfileappender/55205/2 "2020-05-19T18:53:36Z")

</div>

Thanks for the honest question @Michael Reul. The method you have described is still the current solution. It was brought to the attention today of the engineers and we now have this on the roadmap for a future release, but no ETA. I appreciate you posting about it so we can add it as a feature request.

---

<div class="post-metadata">

### Author: ![pouya\_afshar](https://avatars.discourse-cdn.com/v4/letter/p/eb9ed0/32.png) [@pouya\_afshar](https://community.wowza.com/u/pouya_afshar)
#### Post date: [May 21, 2020, 6:54am UTC](https://community.wowza.com/t/automatic-purging-of-log-files-with-wowzadailyrollingfileappender/55205/3 "2020-05-21T06:54:36Z")

</div>

topic helped me, thanks

[**deluxekala**](http://www.webhostingcommunity.com/)

---

<div class="post-metadata">

### Author: ![Michael\_Reul1](https://avatars.discourse-cdn.com/v4/letter/m/f05b48/32.png) [@Michael\_Reul1](https://community.wowza.com/u/Michael_Reul1)
#### Post date: [June 30, 2020, 11:32am UTC](https://community.wowza.com/t/automatic-purging-of-log-files-with-wowzadailyrollingfileappender/55205/4 "2020-06-30T11:32:45Z")

</div>

If anybody needs it, here is a quick solution to delete all wowza logfiles older than 5 days via cronjob:

```auto
# Purge Wowza Logfiles older than 20 days:
echo "0 8 * * * root find /usr/local/WowzaStreamingEngine/logs/wowzastreamingengine_* -type f -mtime +5 -exec rm -f {} \;" > /etc/cron.d/purge-wowza-log-files

```
