Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 757 Bytes

README.md

File metadata and controls

23 lines (16 loc) · 757 Bytes

simple-observers

Observers for use with the Twisted logging framework that only print what you tell them to. In particular, they ignore timestamps and system. This can be useful when you want to interop with other logging solutions like syslog, which can be configured to handle timestamps in a uniform way for all your applications.

Example usage with twistd

$ twistd --logger simple_observers.SimpleStdoutLogger -n web

This will log everything to stdout. If you want to preserve stderr you can use simple_observers.SimpleStreamLogger.

There are also KeyValue varieties like KeyValueStdoutLogger and KeyValueStreamLogger. These will attempt to encode messages in structured logfmt.