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 details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file logbind-2017.11.7.tar.gz.
File metadata
- Download URL: logbind-2017.11.7.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1631e2b10138aa4eeece554cadcb738ca2f5be562ba7b3abd2c8cbacaa9bcaea
|
|
| MD5 |
83b1b2c16db9ae10df0570ac46396b23
|
|
| BLAKE2b-256 |
289bfa87d1f36ee15882f05bd8a1f66f7d0ad117dade6819ef77eac09581c69e
|
File details
Details for the file logbind-2017.11.7-py2.py3-none-any.whl.
File metadata
- Download URL: logbind-2017.11.7-py2.py3-none-any.whl
- Upload date:
- Size: 13.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a57930b3d87f26cc803abd185f2bdfb6eb6be221a3cc8d1496549e289ffa9625
|
|
| MD5 |
466cbe8e748e770285f342ffd5aedc69
|
|
| BLAKE2b-256 |
1660f3e5c0dc5b1c5693d8571ef23344d7a85578fe6ebea15de537128b100034
|