Skip to main content

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.2.1.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

classlogging-1.2.1-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file classlogging-1.2.1.tar.gz.

File metadata

  • Download URL: classlogging-1.2.1.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.16 Darwin/24.2.0

File hashes

Hashes for classlogging-1.2.1.tar.gz
Algorithm Hash digest
SHA256 6ff1dcb79d0c3614ffba72e9434fdbc8fe644773641839cee0791a3a634744f5
MD5 117b2a9d82f477926533e7f658b3fa4e
BLAKE2b-256 b943beab05dd895644f9cb14536756ae1b0d80485966d7b2707af616b072d755

See more details on using hashes here.

File details

Details for the file classlogging-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: classlogging-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.16 Darwin/24.2.0

File hashes

Hashes for classlogging-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 41d49f4018a12ffed17b26c6a90cb88770a2952a17ac7b750ab313c05f5c6134
MD5 df0e556e3b5ed46614da8f71baadd0e3
BLAKE2b-256 b2eb677986d485fc4f2e1dba4e293208c1651235a06c16e7f568f10b97793ab7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page