Rotating logs
As you are probably aware, Zope 2 generates log files. Hence, we need to think about what to do when these log files grow.
Using iw.rotatezlogs on Mac OS X, Ubuntu Linux, and Windows
One of the tasks that could be difficult to standardize across operating systems is rotating Zope 2 log files. Luckily for us, there is iw.rotatezlogs (http://pypi.python.org/pypi/iw.rotatezlogs).
Although technically not a recipe, iw.rotatezlogs makes it simple to set up log rotation.
The process involves three steps:
Add the iw.rotatezlogs egg to the
eggs
parameter ininstance
section.Add an
event-log-custom
parameter to yourinstance
section with iw.rotatezlogs settings.Add an
access-log-custom
parameter to yourinstance
section with iw.rotatezlogs settings.
In 05-deployment-maintenance-rotate.cfg
, we have the following:
[buildout] extends = 05-deployment-maintenance-cron2.cfg [instance] eggs += iw.rotatezlogs event-log-custom = %import iw.rotatezlogs <rotatelogfile> path ${buildout...