Scribe logger
This package contains a low level interface for writing to Scribe, as well as a higher level log handler which plays nicely with Python's logging facilities.
Supports Python 2.7
Installation
pip install scribe-logger
Testing locally
git clone https://github.com/adilansari/python-scribe-logger.git
cd python-scribe-logger
pip install -U -r requirements.txt
python runtests.py
Logger usage
from scribe_logger.logger import ScribeLogHandler
import logging
my_logger = logging.getLogger('MyLogger')
my_logger.setLevel(logging.DEBUG)
scribe = ScribeLogHandler('localhost', 1464, category='test_category')
scribe.setLevel(logging.DEBUG)
my_logger.addHandler(scribe)
my_logger.info('This is a test message')
Writer usage
from scribe_logger.writer import ScribeWriter
writer = ScribeWriter('localhost', 1464, 'category')
writer.write('my message')