Enhanced logging for the FAST-HEP toolkit
Project description
fasthep-logging
The FAST-HEP logging package adds two new log levels to the standard Python logging:
TRACE
is the most verbose level, and is used for debugging purposes.TIMING
is used to log timing information. Log level is betweenDEBUG
andWARNING
.
In addition, this package sets a logging standard for FAST-HEP projects:
- per-log-level formatting
- log file support
Example
from fasthep_logging import get_logger, TRACE
log = get_logger("FASTHEP::Carpenter")
log.setLevel(TRACE)
...
log.debug("This is a debug message %s", msg)
log.trace("This is a verbosity level higher than DEBUG")
from codetiming import Timer
with Timer(
text=f"Processing data took {{:.3f}}s for {file_path}",
logger=log.timing, # type: ignore[attr-defined]
):
process_data(file_path)
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
fasthep_logging-2024.6.1.tar.gz
(15.8 kB
view details)
Built Distribution
File details
Details for the file fasthep_logging-2024.6.1.tar.gz
.
File metadata
- Download URL: fasthep_logging-2024.6.1.tar.gz
- Upload date:
- Size: 15.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebeaccf4cb1d2226e329a20da53b8213e18d3b418cc2df1ca4d2544ac79d96d9 |
|
MD5 | 6ca9f829804d0aa22603ef628e7dcc6d |
|
BLAKE2b-256 | a88d0262db38d19a47043d60efcda2bf3edf7f59cafec44697b1d703f57fc31f |
File details
Details for the file fasthep_logging-2024.6.1-py3-none-any.whl
.
File metadata
- Download URL: fasthep_logging-2024.6.1-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8795bb913126c8ab3916dbbc83affdfc9929043f0916202956d0a3b0ca5c42c0 |
|
MD5 | bfd13b844ef860001631eb984f9713ef |
|
BLAKE2b-256 | 21ae4ac8ef71f9db546fd046f473e379ddee8237404160518415c6cf173939ea |