zconfig-watchedfile

ZConfig statement to register a logging handler using WatchedFileHandler


Keywords
ZConfig, WatchedFileHandler, logging, handler
License
ZPL-2.1
Install
pip install zconfig-watchedfile==2.0

Documentation

zconfig_watchedfile

Provides a ZConfig statement to register a logging handler that uses a WatchedFileHandler, which is helpful for integrating with an external logrotate service:

%import zconfig_watchedfile
<logger>
  name example

  <watchedfile>
    path /path/to/logfile.log
  </watchedfile>
</logger>

The <watchedfile> supports both the default ZConfig settings for handlers (formatter, dateformat, level) and the parameters of WatchedFileHandler (mode, encoding, delay).

This package is compatible with Python version 3.8 up to 3.11.