A log handler for the Python logging module, emitting all logs to specific Redis channels
Project description
redis-log-handler
Handler for the std logging module which puts logs through to Redis.
How to use
Each handler needs a channel name, and where needed a specified port, password or host.
Handlers open a connection to a channel, so they need to be closed after use or the channel will continue to exist.
Logging can be configured globally:
log_handler = RedisLogHandler('ch:channel')
logging.basicConfig(handlers=(log_handler,), level=logging.INFO)
logging.info('Test-message on channel.')
log_handler.close()
Or as a specific standalone logger:
log_handler = RedisLogHandler('ch:channel')
logger = logging.getLogger('name')
logger.addHandler(log_handler)
logger.setLevel('WARNING')
logger.warning('Warning message')
log_handler.close()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for redis-log-handler-0.0.1.dev25.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5ec029495fc9211d3fec338e7082bc14453499540df255e7c63db3863649a05 |
|
MD5 | 2cd9829e692517269613423890291883 |
|
BLAKE2b-256 | 6ebc2d43900c7777982ff4560a1265aa0ab146a9a30378c3fbd90d44b3831d9d |
Close
Hashes for redis_log_handler-0.0.1.dev25-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b2fae0497713b2414fa1bac4a6a89e8d3fefc887638dff85407caaf25ab58f7 |
|
MD5 | b9da98f19290066f9e0cf1a088f8079b |
|
BLAKE2b-256 | baa6eb026a836fced659da5aa3b14e62b29beea57b6d27037351600653d17e59 |