Skip to main content

logging-pipeline

Python module to inject logging handler for printing message in the format captured by pipeline.

Install with:

pip install logging-pipeline

If logging is imported a handler is added to the root logger to print the error and warning messages in addition with a format recognized by the pipeline environment executing the script. If the script is executed outside a pipeline nothing is printed. Supported pipelines are:

  • Azure pipelines
  • GitHub actions
  • User defined by environment variables LOGGING_PIPELINE_WARNING_MESSAGE_FORMAT and LOGGING_PIPELINE_ERROR_MESSAGE_FORMAT. The value is used to configure the python logger with {}-format, see LogRecord attributes. E.g. LOGGING_PIPELINE_ERROR_MESSAGE_FORMAT="::%(filename)s:%(lineno)d::%(levelname)s::%(message)s::"

Compatibility

logging-pipeline uses a live-patching system to target the logging library and add a handler.

PyInstaller

The method used to automatically adding a logging handler relies on a .pth file script that python loads at startup. This method does not work when a python application is bundled into an executable with PyInstaller (or similar). If you want to use this tool in an application built with PyInstaller it will need to be manually enabled in your application. This can be done by adding the following line to the top of your main application script:

import logging_pipeline.wrapt_logging

This must be run before logging is imported.

Acknowledgements

The method of patching at runtime is built from the pip_system_certs module.

Release files for logging-pipeline 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for logging-pipeline 0.5.0
File Size Uploaded
logging_pipeline-0.5.0.tar.gz 4.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for logging-pipeline 0.5.0
File Interpreter ABI Platform
logging_pipeline-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.9 kB

Release files / logging_pipeline-0.5.0.tar.gz

Download URL logging_pipeline-0.5.0.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d5a00fce134b4d1b34a10889e5c9208ebdaf8cb8815a816fca0129d3572c572f
BLAKE2b-256 checksum
How to use checksums
ddb71d6ce1b195d988ba85274e70a0c811c04b7149f15c7d67c0b64fe10a5565
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 10, 2025.

Transparency log

Release files / logging_pipeline-0.5.0-py3-none-any.whl

Download URL logging_pipeline-0.5.0-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
05da4bd443cf591ed6fd3d8429f25fed2196073300ce8740b54f99d0d1f683b8
BLAKE2b-256 checksum
How to use checksums
e7155a3d4dd94444f93f62f18932ca91994a895fbd736f5a53dc2ecc09b84b0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 10, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page