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.0.0.tar.gz
(4.8 kB
view hashes)
Built Distribution
Close
Hashes for classlogging-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b656c9edd76da0417cc269409c04d8a0d61ef005913d1c328508d66d0527f871 |
|
MD5 | 8b69f9ab3aa63e61d255cc2d0f769e5d |
|
BLAKE2b-256 | d0909a09c91e3174568c42d380d7b8fbb6a3cbb311211773bda3c7ce06d7dea5 |