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-0.1.0.tar.gz
(4.1 kB
view hashes)
Built Distribution
Close
Hashes for fasthep_logging-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81c75b27a109273113c0d6cee262bc1276924f1cd3bca4ad907de7e49d3f05d6 |
|
MD5 | 516bc995c1ff23081e5a3dd1dce7552c |
|
BLAKE2b-256 | 7bc0f9e2fa6138e2afd2d69d465e69df1683f4e88682a09b89a274f4dd98fc13 |