Python Logging Interceptor
Capture Python's stdlib logging messages and route them to other logging frameworks.
(Modified and packaged for PyPI from Matthew Scholefield's loguru-logging-intercept.)
Currently supported targets:
Loguru is a great alternative logging library for Python. However, if you use
(potentially external) code that already integrates with Python's default logger, you'll
get a combination of the two logging styles. This code provides code for setting up an
intercept handler to route calls to Python's default logging module to Loguru.
Usage
Before calls that use Python's default logging module, call the provided
setup_loguru_interceptor() as shown below:
from logging_interceptor import setup_loguru_interceptor
setup_loguru_interceptor(modules=("foo", "foo.bar", "foo.baz"))
# now call functions from `foo` that use getLogger(__name__)
Installation
Install via pip:
pip3 install logging-interceptor
Metadata
Release files for logging-interceptor 0.1.2
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_interceptor-0.1.2.tar.gz | 3.0 kB | Without provenance | Details for logging_interceptor-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| logging_interceptor-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for logging_interceptor-0.1.2-py3-none-any.whl |
Total release size: 6.7 kB
Release files / logging_interceptor-0.1.2.tar.gz
| Download URL | logging_interceptor-0.1.2.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e2186a8418ae84d922e2a57e0bb48bfd2f9737e897f784dbb7eab8808fbe0a85
|
|
BLAKE2b-256 checksum How to use checksums |
f581493ae002928054cb075d0e16aede958b726a58e7f5c7f4144e03583a533f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.10.4 Linux/5.15.0-74-generic
|
Release files / logging_interceptor-0.1.2-py3-none-any.whl
| Download URL | logging_interceptor-0.1.2-py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dd1e1cf9e81f457427bab08f0816e1cb06e5a427667006c7aa7a0b15f11afa24
|
|
BLAKE2b-256 checksum How to use checksums |
2f592aca8986184705bcb689a7c93d7985c499ccddb7973d31e046d601111916
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.10.4 Linux/5.15.0-74-generic
|
Security for logging-interceptor 0.1.2
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.