Externally-developed handlers, filters and utilities for logging

Below is a list of links to handlers, filters, formatters and utilities which have been developed for use with the logging package in the Python standard library. You'll need to check for licensing terms and documentation at the particular sites linked to. These links are shown for information only and do not imply any specific endorsement: you'll need to do your own research to determine their suitability and applicability for your particular application.



  • This Stack Overflow answer shows SingleLevelFilter, which can be used to redirect INFO-level messages to sys.stdout and other messages to sys.stderr.


  • This Stack Overflow answer by airmind shows a ColoredFormatter, which inserts escape codes to colorize console output.
  • This Stack Overflow answer by Denis Otkidach shows a DispatchingFormatter, which can delegate to different formatters based on properties of the LogRecord.


  • Gabriel Genellina's LoggingWebMonitor listens for LogRecords sent from other processes running in the same box or network, collects and saves them concurrently in a log file. It shows a summary web page with the latest N records received.
  • I've released a desktop log viewer (Qt-based) which allows capture and viewing of logging events - see this post.
  • Brandon Rhodes has released a utility module, logging_tree, which introspects loggers and handlers.

  • (Watch this space - I'll add more entries in due course)

If there are any other handlers or utilities which are not on the above list which you think should be added to the list, please post comments with links and a brief description of what's being linked to. Thanks.

1 comment:

  1. This comment has been removed by a blog administrator.