Skip to main content

Enhanced logging for the FAST-HEP toolkit

Project description

fasthep-logging

Actions Status Documentation Status

PyPI version PyPI platforms

GitHub Discussion Gitter

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 between DEBUG and WARNING.

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


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)

Uploaded Source

Built Distribution

fasthep_logging-0.1.1-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

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

Hashes for fasthep_logging-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8772ea3147ef996a3a6819867cd7bbda5e9e3715778c2f30d8d898c0f4d44b74
MD5 48da13cb3761222e51f6ef593f0227ed
BLAKE2b-256 44b1e845079db72ff80e26f597cae6b2b5f9a5d43988a002e456133270190bbe

See more details on using hashes here.

File details

Details for the file fasthep_logging-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for fasthep_logging-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6c75a0e825eaee48fab4d4da55e25a70858fd0ec2ce55e12c91f68237e1fb96d
MD5 8299bc5174df8c5ec4dca6fd8df4b576
BLAKE2b-256 f7eefd37598c834e7ff98264d67c45396ac1f0757bc8243e095baf9beaada84c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page