logging module (http://docs.python.org/library/logging.html). ScribeHandler
acts a a handler object that gets added to a logger in the standard way.
Important bits:
When instantiating the handler, you will want to specify the connection
setting to scribed. The following keyword arguments are reconized (and
defaults):
Argument Default
---------------------------
host 127.0.0.1
port 1463
category %(hostname)s-%(loggername)s
transport ScribeHandler.FRAMED
uri None
- Host and port, should be obvious
- If transport is ScribeHandler.FRAMED, then
thrift.transport.TTransport.TFramedTransport() is used.
- If transport is ScribeHandler.BUFFERED, then
thrift.transport.TTransport.TBufferedTransport() is used.
- If transport is ScribeHandler.HTTP then
thrift.transport.THttpClient.THttpClient() is used and uri MUST NOT be
None
- If transport is None then you can assign any acceptable Thrift/Scribe
transport via
ScirbeHandler.transport = <transport>
where <transport> is a valid Scibe/Thrift transport (this is an attempt at
future proofing).
- category is translated into the category parameter to scribe.LogEntry()
object. It should be a standard format string using mapping keys.
The following are the reconized mapping keys:
Key Name Source
----------------------
module logging.LogRecord.module
levelname logging.LogRecord.levelname
loggername logging.LogRecord.name
processname logging.LogRecord.processName
hostname socket.gethostname()
Here's a simple example of how to use it:
import logging
import ScribeHandler
mylogger = logging.getLogger('ScribeLogger')
mylogger.setLevel(logging.DEBUG)
handler = ScribeHandler.ScribeHandler(category='%(hostname)s-%(levelname)s', file_buffer='/tmp/logbuffer')
mylogger.addHandler(handler)
mylogger.debug('stuff happens')
Metadata
Release files for ScribeHandler 0.05
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ScribeHandler-0.05.tar.gz | 9.2 kB | Without provenance | Details for ScribeHandler-0.05.tar.gz |
Release files / ScribeHandler-0.05.tar.gz
| Download URL | ScribeHandler-0.05.tar.gz |
|---|---|
| Size | 9.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
763a125cd6fea41c32720cf3d01b0831716da75857c66bbf7e085f28c9a5e7c3
|
|
BLAKE2b-256 checksum How to use checksums |
bb3e52939f22e96d3e537b203235ae436f7b9923754e99a13b210a518626197e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for ScribeHandler 0.05
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.