Skip to main content

Build Status Code Climate Coverage Status License Downloads

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')

Exceptions are suppressed by default. Use silent=False to raise them:

scribe = ScribeLogHandler('localhost', 1464, category='test_category', silent=False)

Writer usage

from scribe_logger.writer import ScribeWriter

writer = ScribeWriter('localhost', 1464, 'test_category')
try:
    writer.write('test_message_1')
    writer.write(['test_message_1', 'test_message_2', 'test_message_3'])
except ScribeLoggerError:
    raise

Exceptions are raised by default. Use silent=True to suppress them:

writer = ScribeWriter('localhost', 1464, 'test_category', silent=True)
writer.write('test_message_1')
writer.write(['test_message_1', 'test_message_2', 'test_message_3'])

Contributors

@adilansari @mwhooker @lenn0x

Release files for scribe_logger 1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scribe_logger 1.3
File Size Uploaded
scribe_logger-1.3.tar.gz 3.9 kB Details

Release files / scribe_logger-1.3.tar.gz

Download URL scribe_logger-1.3.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
0a4da935cb618fab2c2fffa1ed97304704e6db12e331fe206691af9c27a7f27f
BLAKE2b-256 checksum
How to use checksums
783932afca3b3a5fc093a7c9290a88cd90c5472d46a2868e96f3f4dcd91a71ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.3 This release

1 release file

1.2

1 release file

1.1.1

1 release file

1.1

1 release file

1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page