logbind
Project description
logbind
Easily bind new fields into your logger instances.
# Original logger logger = logging.getLogger('a') logger.info('Hello') logger = logbind.bind(logger, id=12345) logger.info('Hello') # <- This logrecord has an extra field "id" logger = logbind.bind(logger, abc=67890) logger.info('Hello') # <- logrecord has two extra fields: "id" and "abc"
This feature will be most useful with a structured logging formatter, such as JSON. You could try logjson for example.
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
logbind-2017.11.7.tar.gz
(7.7 kB
view hashes)
Built Distribution
Close
Hashes for logbind-2017.11.7-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a57930b3d87f26cc803abd185f2bdfb6eb6be221a3cc8d1496549e289ffa9625 |
|
MD5 | 466cbe8e748e770285f342ffd5aedc69 |
|
BLAKE2-256 | 1660f3e5c0dc5b1c5693d8571ef23344d7a85578fe6ebea15de537128b100034 |