Class-based logging facility
Project description
classlogging
Class-based logging facility.
Installation
pip install classlogging
Usage example
import classlogging
class MyClass(classlogging.LoggerMixin):
def test_log_value(self, value: str) -> None:
self.logger.debug(f"Got value: {value}")
if __name__ == "__main__":
classlogging.configure_logging(level=classlogging.LogLevel.DEBUG)
MyClass().test_log_value("Foo")
# Writes to stderr:
# 2022-01-01 12:34:56,789 DEBUG [__main__.MyClass] Got value: Foo
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
classlogging-1.1.0.tar.gz
(7.5 kB
view hashes)
Built Distribution
Close
Hashes for classlogging-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f94c3645caa4df914ba5a420cab91d0472e97f735e733ed06fc2410da107e12d |
|
MD5 | 3f2615c5a7bec9fe3d32fdb9d3c9140c |
|
BLAKE2b-256 | decc3233c8b3ada83d500b7d97f0d2a01caadae0c6e4f22aad83a9a56ae1e125 |