Python protocol for the standard lib Logger and Logger-like classes.
Project description
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
Project details
Release history Release notifications | RSS feed
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)
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db00c23b199a515c6eecf01767a9a35bd3ebc4eb99ba12bb7ddfb839418b672d
|
|
| MD5 |
e0ba5eb6a8dcecb6cddca09541f5fb23
|
|
| BLAKE2b-256 |
ecb2d7f26a3dfb9f31839850ea65329edfee74c4ba31ea1336795c182f72b498
|