Skip to main content

A Python logging library that provides a simple and easy-to-use interface for logging.

Project description

logman

logman is inspired by the SLF4J LoggerFactory from the Spring ecosystem. It aims to provide a similar experience for Python developers, featuring JSON logging and log rotation capabilities.

visit https://logman.wimcorp.dev

Quickstart

  1. Install logman
$ pip install logman
  1. Import and use the logger
from logman import LoggerFactory

class MyClass:
  def ___init___(self):
    self.logger = LoggerFactory.getLogger(self.__class__.__name__)

  def my_method(self):
      self.logger.info('Hello, World!')

myClass = MyClass()
myClass.my_method()
$ python my_script.py
{"context": "MyClass", "level": "INFO", "timestamp": "2024-07-24 16:25:10.016", "message": "Hello, World!", "thread": "MainThread"}

Run Tests

pytest

pip install pytest
python -m unittest discover -s tests -p 'test_*.py'

tox

pip install tox pytest
tox

Build Docs

Sphinx

pip install Sphinx sphinx-autobuild sphinx-rtd-theme myst_parser
cd docs
make html

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

logman-0.0.3.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

logman-0.0.3-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file logman-0.0.3.tar.gz.

File metadata

  • Download URL: logman-0.0.3.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for logman-0.0.3.tar.gz
Algorithm Hash digest
SHA256 16596ed9e6ccfe1375d091c9caa99200832a1bdf991d093a0395872bd2b0f96c
MD5 8298cca72b1fb4580658aa9783646c12
BLAKE2b-256 07d1ef19c3e557682300ef8cba4c6c264cf1a3e9e7d9f926afa3fabc18829c99

See more details on using hashes here.

File details

Details for the file logman-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: logman-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for logman-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1a6eec59c4d3c3280d76fe9965fa4599950c187aa9416f1fc7a3eb3f725274e9
MD5 47ec4458a5e405d30de084d72e792d8f
BLAKE2b-256 5161be15da167bf0dd82380a9cde8854bbd91da901320c577ef8fa9310bc66c7

See more details on using hashes here.

Supported by

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