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.1.tar.gz
(7.5 kB
view hashes)
Built Distribution
Close
Hashes for classlogging-1.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c2c11a62f338e8c2e4603b3b3bfce6bce9ec2ebd2660f1f4d802235ea56208a |
|
MD5 | 9d30e0946ba565a29e6f1b0f1bc5add1 |
|
BLAKE2b-256 | 16b839dc270f6fc50c9f43049c5a2a69c5556d2e2f29b55ad801bc21048f371c |