py-amqp-logging /

Filename Size Date modified Message
34 B
53 B
0 B
1.1 KB
1.0 KB

For a project I've been working on, it was necessary to push Python
logging information out to an AMQP system.  There are not guarantees
that it will be of any use to anyone else, but it's here if you want to
use it.


There are two components to the system:

  * ``AMQPHandler`` provides a connection to the AMQP middleware.
  * ``JSONFormatter`` takes a Python ``LogRecord`` object and formats it
    in JSON to pass.

While you don't need to use the ``JSONFormatter`` specifically with
this, I wanted something that was parsable trivially on the other end.


There are a couple libraries that this depends on:

  1. `py-amqplib`_ provides the connection the AMQP protocol
  2. `anyjson`_ provides a a clear abstraction over multiple JSON

These need to be installed before this will work.

.. _`py-amqplib`:
.. _anyjson: