tha.logcheck: logchecker for zope logfilesΒΆ

Tags: plone, thehealthagency

Zope has good logfiles. If there's a real error which results in a traceback, even the traceback ends up in the logfile. The conclusion is that a log message can spread over multiple lines. That's why zope's logfile entries are separated by ------.

For monitoring your logfiles, logcheck is a good solution, even though it looks a bit debian-specific at the moment. I could not, however, get it to handle the multi-line zope logfiles in a handy manner. Solution: I build my own logchecker. I had a logfile-parsing utility ("logsplitter") lying around from when I needed to make sense of three months of logfiles from a big customer at zest.

At The Health Agency we're really upgrading and improving our back end systems (buildbot, release scripts, pypi egg proxy, couple of buildout recipes) and automated zope logchecking is another step we want to take. So I cleaned up ye olde logsplitter, added logchecking functionality and packaged it all up as tha.logcheck.

Installing tha.logchecker installs two programs:

  • logsplitter: parses a logfile and gives you a handy summary of all errors (and optionally all warnings, too).
  • logchecker: checks your logfile and mails you the errors (and optionally the warnings, too). You can give it additional filters..

logchecker -h and logsplitter -h give you usage information.