The logging package is very useful, but a little painful to use. This package provides low impact logging setup and some extremely useful if unconventional context hooks for logging.
The logging verbosity output format has different defaults based on whether an output log file is a tty and whether the environment variable $DEBUG is set, and to what.
On terminals warnings and errors get ANSI colouring.
A mode is available that uses cs.upd.
Some examples:
Program initialisation:
from cs.logutils import setup_logging def main(argv): cmd = os.path.basename(argv.pop(0)) setup_logging(cmd)
Basic logging from anywhere:
from cs.logutils import info, warning, error
[...]
def some_function(...):
[...]
error("nastiness found! bad value=%r", bad_value)
Metadata
Release files for cs-logutils 20171030
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 |
|---|---|---|---|---|
| cs.logutils-20171030.tar.gz | 7.6 kB | Without provenance | Details for cs.logutils-20171030.tar.gz |
Release files / cs.logutils-20171030.tar.gz
| Download URL | cs.logutils-20171030.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
068c3557c224ec2949defbd4556f0e3dc1e90efb27c8b3d1eb60849e102df6e9
|
|
BLAKE2b-256 checksum How to use checksums |
5b05140ca9a889b0f7b84e50b6b470ae71be94c8b960fb40545c43727a3b0b07
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for cs-logutils 20171030
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.