Login

Snippets by afternoon

Snippet List

Twisted protocol for receiving logging module messages over a socket

When using Python's logging module in a concurrent environment (e.g. mod_python), messages get dropped by the standard file-based handlers. The [SocketHandler](http://www.python.org/doc/2.5.2/lib/node414.html) allows you to send logging messages to a remote socket. This snippet provides code for listening for such messages and writing them out to a log file. The final log file is configured as a standard logging file-based handler.

  • logging
  • twisted
Read More

afternoon has posted 1 snippet.