This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

A logging handler for Python that publishes log messages using redis’s pub/sub system. You can use this to read or respond to streaming log data in real time.

Installation

The current stable release

easy_install python-redis-log

The latest from github

git clone git://github.com/jedp/python-redis-log.git
cd python-redis-log
python setup.py build
python setup.py install --prefix=$HOME  # for example

Requirements

Usage

>>> from redislog import handlers, logger
>>> l = logger.RedisLogger('my.logger')
>>> l.addHandler(handlers.RedisHandler.to("my:channel"))
>>> l.info("I like pie")
>>> l.error("Trousers!", exc_info=True)

Redis clients subscribed to my:channel will get a json log record like the following (sent from function foo() in file test.py:

{ username: 'jed',
  args: [],
  name: 'my.logger',
  level: 'info',
  line_no: 6,
  traceback: null,
  filename: 'test.py',
  time: '2011-06-02T14:50:08.237052',
  msg: 'winning',
  funcname: 'foo',
  hostname: 'smoothie.local' }

If an exception is raised, and exc_info is True, the log will include a formatted traceback in traceback.

The date is stored as an ISO 8601 string in GMT.

You can use the redis-cli shell that comes with redis to test this. At the shell prompt, type subscribe my:channel (replacing with the channel name you choose, of course). You will see subsequent log data printed in the shell.

Serving Suggestion

Redis pub/sub messages are not persistent; they are just messages. So you will probably wish to use this handler in conjunction with other handlers that actually save your data, like the standard python FileHandlers, or Andrei Savu’s MongoDB logging handler.

Contributors

Release History

Release History

0.1.2

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
python_redis_log-0.1.2-py2.6.egg (7.8 kB) Copy SHA256 Checksum SHA256 2.6 Egg Jun 3, 2011
python-redis-log-0.1.2.tar.gz (4.7 kB) Copy SHA256 Checksum SHA256 Source Jun 3, 2011

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting