How to rotate Plone 5.2.4 log?

access-log-handler = logging.handlers.TimedRotatingFileHandler
access-log-args = (r"${buildout:directory}/var/log/${:buildout_section_name}-access.log",)
access-log-kwargs = {"when": "D", "interval": 1}

But the log still rotate per hour.

Thats why I try to disable the logging with
access-log,z2-log = disable

But this not work too, can some one help by point to a updated doc?

What file are those lines in?



Do you run buildout after updating those lines? It would generate/modify resulting files but then you may have to restart something e.g. logrotate before the changes would take effect.

logrotate is not involved here. The configuration relates to logging.handlers.TimedRotatingFileHandler which is added to the generated wsgi.ini, if configured.



How can i compress the rotated files? Is there a secret option? Or should i write my own handler by subclassing the rotationhandler?

Perhaps using this:

At least for *nix there are tools for logfile compression (e.g logrotate).

1 Like

Plone Foundation Code of Conduct