Python’s logging module from the standard libarary has over stayed its welcome for far too long.

Armin Ronacher, the creator of Sphinx, Flask, and Pygments just released a much needed module to the Python community: Logbook.

Logbook is an extremely well documented and powerful logging handler library. Out of the box, it includes log handlers for Standard Logfiles, Email, Syslog, NTEventLog, and Custom Notifiers. It even supports Growl and LibNotify integration.

Basic usage:

>>> from logbook import Logger
>>> log = Logger('Logbook')
>>> log.info('Hello, World!')
[2010-07-23 16:34] INFO: Logbook: Hello, World!

Growl Integration:

import logbook.notifiers
from logbook import Logger

logger = Logger('Haystack')
handler = logbook.notifiers.create_notification_handler()

with handler:
    logger.warn('This is a notification!')

[Project Page] [Source on GitHub] [DjangoCon Presentation]


Have comments? Send a tweet to @TheChangelog on Twitter.

Subscribe to The Changelog Weekly – our weekly email covering everything that hits our open source radar.