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.1.tar.gz
(4.2 kB
view details)
Built Distribution
File details
Details for the file fasthep_logging-0.1.1.tar.gz
.
File metadata
- Download URL: fasthep_logging-0.1.1.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8772ea3147ef996a3a6819867cd7bbda5e9e3715778c2f30d8d898c0f4d44b74 |
|
MD5 | 48da13cb3761222e51f6ef593f0227ed |
|
BLAKE2b-256 | 44b1e845079db72ff80e26f597cae6b2b5f9a5d43988a002e456133270190bbe |
File details
Details for the file fasthep_logging-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: fasthep_logging-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c75a0e825eaee48fab4d4da55e25a70858fd0ec2ce55e12c91f68237e1fb96d |
|
MD5 | 8299bc5174df8c5ec4dca6fd8df4b576 |
|
BLAKE2b-256 | f7eefd37598c834e7ff98264d67c45396ac1f0757bc8243e095baf9beaada84c |