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.2.tar.gz
(6.0 kB
view hashes)
Built Distribution
Close
Hashes for classlogging-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06f0c0a9b420396614b2d1d2f42cc98fc06b36b1f50591a9a2b29dc5176db618 |
|
MD5 | ad59b51451ac70874f908f97485b5daf |
|
BLAKE2b-256 | 9ab2e1592d1cc6141fe2bcad438faf9a1d8401519e374c9f28a2188f1c66406f |