Source

py-amqp-logging /

Filename Size Date modified Message
amqp-logging
34 B
0 B
1.0 KB
1006 B
py-amqp-logging
===============

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.


Components
==========

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.


Dependencies
============

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
      implementations.

These need to be installed before this will work.

.. _`py-amqplib`: http://barryp.org/software/py-amqplib/
.. _anyjson: http://pypi.python.org/pypi/anyjson/