Skip to main content

Structured process logger (logging.LoggerAdapter with contextual params)

Project description

process-logger

Structured process logger — a logging.LoggerAdapter that attaches contextual params (process name, code, locale, db-operation, function name) to every record, with optional QueueListener-based async logging.

Installation

pip install entirius-py-process-logger

Usage

from process_logger import ProcessLogger

log = ProcessLogger(process_name="import-orders", module="integrations")
log.add_log_param("order_id", 18)
log.info("Order created")

For async logging, initialise with use_queue=True and call log.start() / log.stop().

Development

make install     # sync dependencies (uv)
make check       # lint + format check (ruff)
make test        # test suite (pytest)

Development and agent instructions: AGENTS.md.

License

Mozilla Public License 2.0 — see LICENSE.

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

entirius_py_process_logger-2.0.0.tar.gz (22.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

entirius_py_process_logger-2.0.0-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file entirius_py_process_logger-2.0.0.tar.gz.

File metadata

  • Download URL: entirius_py_process_logger-2.0.0.tar.gz
  • Upload date:
  • Size: 22.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for entirius_py_process_logger-2.0.0.tar.gz
Algorithm Hash digest
SHA256 4d7e3bc34fcbc91dba6a3ea3ab9580511ac3fb92d8112791c4aa3711cd0e1d82
MD5 3fdba47f148ec8d7a9b08dedff9a28ee
BLAKE2b-256 2d68d667565e31e10360b32345e779ef14d790da4cbfabb16d3894f3d128e105

See more details on using hashes here.

File details

Details for the file entirius_py_process_logger-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: entirius_py_process_logger-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for entirius_py_process_logger-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 faed514a4f0e8fcc1dc746f3b582e0a14642748c45eee63017b7ba52b67874c5
MD5 6db7cf92f04d50a24fea53c98bd1c489
BLAKE2b-256 d36517c85a60d808544f87a7009167d1def3a145235af901a1243e00bbf2e527

See more details on using hashes here.

Supported by

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