title: Automatically delete logs in Django
body: <p>Building a Django app, I am trying to figure out what would be the best way to automate log file deletion.</p>
  <p>My try so far is to build a admin command that delete old logs. From this I can setup a scheduler in python or at server's level but I am not very satisfied with this option because it makes more configuration steps to do during deployment.</p>
  <p>I was wondering if sub-classing log module to trigger a delete-log function on a log write would be a good idea. The pros would be that there is not setup to do a deployment, the cons would be to rely on log write to clean log directory could be useless if there is no log records for a long time. On the other hand it could be resource consuming if there is too many log records.</p>
  <p>So first of all, is a log-delete triggered by any action could be a good idea and what would be the best action to choose (a daily one)?</p>
  <p>If not, what would be the best option to perform this in a beautiful way?</p>