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.1.tar.gz
(4.8 kB
view hashes)
Built Distribution
Close
Hashes for classlogging-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6baca85ba59f9f84683f354a3f56e024bd75e31bff63b39139029adb4caf7e0 |
|
MD5 | 46706c0ccf6bdc743710aa137933eb55 |
|
BLAKE2b-256 | f715e1a2be38fb86e4af36aa4a86a7569e96cf18a0de37bbda41910146a1b8b4 |