nice_logging
Simple logging library that has colored and timestamped output by default. Can be used as a drop-in replacement.
Installation
pip install nice_logging
(Or just grab the .py file)
Usage
import nice_logging
nice_logging.basicConfig(level=nice_logging.DEBUG)
logger = nice_logging.getLogger(__name__)
logger.info("Hello")
2023-07-23 11:27:33,571 [INFO ] [__main__] Hello
Or:
import nice_logging as logging
Structured Logging
nice_logging has support for rudimentary structured logging. If you use getStructuredLogger instead of getLogger (or instantiate a StructuredLogger), you will get a logger whose log functions take a single message, and any number of keyword arguments, which are aggregated in a single dict. The resulting LogRecord will have the attribute structured set to True, and structured_data to the dict.
Metadata
Release files for nice-logging 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nice_logging-1.1.1.tar.gz | 4.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nice_logging-1.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.2 kB
Release files / nice_logging-1.1.1.tar.gz
| Download URL | nice_logging-1.1.1.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bfb2486f7838c705cb5ac43beabb74b34890e6a2844a4d9f1785cf97afecfea6
|
|
BLAKE2b-256 checksum How to use checksums |
eebd3c4bf3ae40618a15b28cc5eda6879bea224eb399c02de9f99b7f36c8a5f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.12
|
Release files / nice_logging-1.1.1-py3-none-any.whl
| Download URL | nice_logging-1.1.1-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
beb487aadbb25db117fae90374add6f2645da2450a9e6376150c2e1a693e2952
|
|
BLAKE2b-256 checksum How to use checksums |
00fcea9ff63be1943cca44df7769dd9c752e238bf3132046c5b91e525119c40c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.12
|