Skip to main content

Logger Protocol

Python protocol for the standard lib Logger and Logger-like classes.

import logging

from logger_protocol import LoggerProtocol, SilentLogger


class MyClass:
    _logger: LoggerProtocol

    def __init__(self, verbose: bool = True):
        self._logger = logging.getLogger(__name__) if verbose else SilentLogger

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

logger_protocol-1.0.0.tar.gz (2.9 kB view details)

Uploaded Source

File details

Details for the file logger_protocol-1.0.0.tar.gz.

File metadata

  • Download URL: logger_protocol-1.0.0.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.6

File hashes

Hashes for logger_protocol-1.0.0.tar.gz
Algorithm Hash digest
SHA256 db00c23b199a515c6eecf01767a9a35bd3ebc4eb99ba12bb7ddfb839418b672d
MD5 e0ba5eb6a8dcecb6cddca09541f5fb23
BLAKE2b-256 ecb2d7f26a3dfb9f31839850ea65329edfee74c4ba31ea1336795c182f72b498

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 file

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