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_FORMATandLOGGING_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.
Metadata
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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| logging_pipeline-0.5.0.tar.gz | 4.9 kB | With provenance | Details for logging_pipeline-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| logging_pipeline-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for logging_pipeline-0.5.0-py3-none-any.whl |
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 logRelease 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 logSecurity for logging-pipeline 0.5.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for logging_pipeline-0.5.0.tar.gz
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 logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.