Skip to main content

Loguru Logging Intercept

PyPI - Version PyPI - Downloads

Code to integrate Loguru with Python's standard logging module

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 a function that sets 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_logging_intercept() as shown below:

import logging
from loguru_logging_intercept import setup_loguru_logging_intercept


def main():
    setup_loguru_logging_intercept(
        level=logging.DEBUG,
        modules=("foo", "foo.bar", "foo.baz")
    )
    # Can now call functions from foo that use getLogger(__name__)

...

Installation

Install via pip or uv:

pip3 install loguru-logging-intercept
# or
uv pip install loguru-logging-intercept

Metadata

Release files for loguru-logging-intercept 0.1.7

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

Source distribution (sdist)

Source distribution for loguru-logging-intercept 0.1.7
File Size Uploaded Provenance Actions
loguru_logging_intercept-0.1.7.tar.gz 3.3 kB Without provenance Details for loguru_logging_intercept-0.1.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for loguru-logging-intercept 0.1.7
File Interpreter ABI Platform Actions
loguru_logging_intercept-0.1.7-py3-none-any.whl Python 3 none any Details for loguru_logging_intercept-0.1.7-py3-none-any.whl

Total release size: 6.9 kB

Release files / loguru_logging_intercept-0.1.7.tar.gz

Download URL loguru_logging_intercept-0.1.7.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e509c8a8ad6a7f412cead9b0f6ab2a3f58e0b4ef0f137df4214889b65dd34eee
BLAKE2b-256 checksum
How to use checksums
684aebb27a793eb8103ede2c172cbb3e5aaf8065713821a228f277f10556e69c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / loguru_logging_intercept-0.1.7-py3-none-any.whl

Download URL loguru_logging_intercept-0.1.7-py3-none-any.whl
Size 3.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
017b0a47c019d22f9cb4737aa1a21f02a089751077b0ea8ff1e819da49974d61
BLAKE2b-256 checksum
How to use checksums
4e9f9a3cba424418be9c2a5a8426bc6682a5b764ad58be93689b30e8cf16a20d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for loguru-logging-intercept 0.1.7

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.

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