Tuesday, September 25, 2012

Easier log rotation for buildout users


If you are using buildout and the plone.recipe.zope2instance (>= 4.2.5) to create your zope installation, two parameters are available to enable log rotation. For example:
  • event-log-max-size = 10mb
  • event-log-old-files = 3
This will rotate the event log when it reaches 10mb in size. It will retain a maximum of 3 files. Similar direcives are also available for the access log.
  • access-log-max-size = 100mb
  • access-log-old-files = 10
Enjoy!