Contextual Logger
Usage
import logging
import contextual_logger
logger = logging.getLogger("name")
def process_example(ex):
logger.info("Processing example by doing ...")
return ex
data = ...
with logger(dataset="SST2"):
data = [process_example(d) for d in data]
{
"level_name": "INFO",
"timestamp": "...",
"logger": "demo",
"message": "Processing example by doing ...",
"dataset": "SST2"
}
{
"level_name": "INFO",
"timestamp": "...",
"logger": "demo",
"message": "Processing example by doing ...",
"dataset": "SST2"
}
Metadata
Release files for contextual-logger 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| contextual-logger-0.0.2.tar.gz | 4.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| contextual_logger-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.8 kB
Release files / contextual-logger-0.0.2.tar.gz
| Download URL | contextual-logger-0.0.2.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6114dfa8868f0fa738dcc0fbffb7a3549517c03387dfaf9c11cb9e95bd2a13c1
|
|
BLAKE2b-256 checksum How to use checksums |
b4cbeb1ea004ec66eba4fb3cc716b17e6783a7fa5abee9b5d6a24cd2e45e6201
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.6
|
Release files / contextual_logger-0.0.2-py3-none-any.whl
| Download URL | contextual_logger-0.0.2-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
15acffe36b4d5a96a8f9955270016b367dc4217b28adead47df967be7c1ab2fb
|
|
BLAKE2b-256 checksum How to use checksums |
e2a66d2542a61dfe3b9bab62b5ae9c1a31d542dee3244bbd89febe90b4842f22
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.6
|