Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Log rotation with Plone

Tags:

zope

plone

The log rotation for Plone product installation would be a nice feature. What are the current best practices regarding the log rotation integration into Plone?

I found this article: http://encolpe.wordpress.com/2010/06/17/how-to-get-log-files-rotate-in-zope-with-buildout/ but as there are no documentation on plone.org I'd like to ping the community for the good known best practices not to fill up their hard disks.

like image 232
Mikko Ohtamaa Avatar asked Dec 07 '22 16:12

Mikko Ohtamaa


1 Answers

ZConfig has support for the standard library RotatingFileHandler and TimedRotatingFileHandler. Taking an example from the ZConfig tests:

<eventlog>
  <logfile>
    path /path/to/file.log
    level debug
    when D
    interval 3
    old-files 11
  </logfile>
</eventlog>

This will roll over the logs every three days, keeping 11 old files.

You place these config snippets your buildout using the event-log-custom/access-log-custom parameters in your instance recipe. plone.recipe.zope2instance

like image 57
Laurence Rowe Avatar answered May 16 '23 08:05

Laurence Rowe