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
- Install logman
$ pip install logman
- 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
Metadata
Release files for logman 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| logman-0.0.3.tar.gz | 7.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| logman-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.0 kB
Release files / logman-0.0.3.tar.gz
| Download URL | logman-0.0.3.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
16596ed9e6ccfe1375d091c9caa99200832a1bdf991d093a0395872bd2b0f96c
|
|
BLAKE2b-256 checksum How to use checksums |
07d1ef19c3e557682300ef8cba4c6c264cf1a3e9e7d9f926afa3fabc18829c99
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.12
|
Release files / logman-0.0.3-py3-none-any.whl
| Download URL | logman-0.0.3-py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1a6eec59c4d3c3280d76fe9965fa4599950c187aa9416f1fc7a3eb3f725274e9
|
|
BLAKE2b-256 checksum How to use checksums |
5161be15da167bf0dd82380a9cde8854bbd91da901320c577ef8fa9310bc66c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.12
|