# 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
```bash
$ pip install logman
```
2. Import and use the logger
```python
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()
```
```bash
$ python my_script.py
{"context": "MyClass", "level": "INFO", "timestamp": "2024-07-24 16:25:10.016", "message": "Hello, World!", "thread": "MainThread"}
```
## Run Tests
### pytest
```bash
pip install pytest
python -m unittest discover -s tests -p 'test_*.py'
```
### tox
```bash
pip install tox pytest
tox
```
## Build Docs
### Sphinx
```bash
pip install Sphinx sphinx-autobuild sphinx-rtd-theme myst_parser
cd docs
make html
```
Raw data
{
"_id": null,
"home_page": "https://github.com/WIM-Corporation/logman",
"name": "logman",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.7",
"maintainer_email": null,
"keywords": "logman, logging, logger, log",
"author": "hbjs",
"author_email": "hbjs <hbjs97@naver.com>",
"download_url": "https://files.pythonhosted.org/packages/07/d1/ef19c3e557682300ef8cba4c6c264cf1a3e9e7d9f926afa3fabc18829c99/logman-0.0.3.tar.gz",
"platform": null,
"description": "# logman\n\n**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.\n\nvisit <https://logman.wimcorp.dev>\n\n## Quickstart\n\n1. Install logman\n\n```bash\n$ pip install logman\n```\n\n2. Import and use the logger\n\n```python\nfrom logman import LoggerFactory\n\nclass MyClass:\n def ___init___(self):\n self.logger = LoggerFactory.getLogger(self.__class__.__name__)\n\n def my_method(self):\n self.logger.info('Hello, World!')\n\nmyClass = MyClass()\nmyClass.my_method()\n```\n\n```bash\n$ python my_script.py\n{\"context\": \"MyClass\", \"level\": \"INFO\", \"timestamp\": \"2024-07-24 16:25:10.016\", \"message\": \"Hello, World!\", \"thread\": \"MainThread\"}\n```\n\n## Run Tests\n\n### pytest\n\n```bash\npip install pytest\npython -m unittest discover -s tests -p 'test_*.py'\n```\n\n### tox\n\n```bash\npip install tox pytest\ntox\n```\n\n## Build Docs\n\n### Sphinx\n\n```bash\npip install Sphinx sphinx-autobuild sphinx-rtd-theme myst_parser\ncd docs\nmake html\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Python logging library that provides a simple and easy-to-use interface for logging.",
"version": "0.0.3",
"project_urls": {
"Documentation": "https://logman.wimcorp.dev/",
"Homepage": "https://github.com/WIM-Corporation/logman"
},
"split_keywords": [
"logman",
" logging",
" logger",
" log"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5161be15da167bf0dd82380a9cde8854bbd91da901320c577ef8fa9310bc66c7",
"md5": "47ec4458a5e405d30de084d72e792d8f",
"sha256": "1a6eec59c4d3c3280d76fe9965fa4599950c187aa9416f1fc7a3eb3f725274e9"
},
"downloads": -1,
"filename": "logman-0.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "47ec4458a5e405d30de084d72e792d8f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.7",
"size": 7874,
"upload_time": "2024-07-25T11:15:30",
"upload_time_iso_8601": "2024-07-25T11:15:30.281213Z",
"url": "https://files.pythonhosted.org/packages/51/61/be15da167bf0dd82380a9cde8854bbd91da901320c577ef8fa9310bc66c7/logman-0.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "07d1ef19c3e557682300ef8cba4c6c264cf1a3e9e7d9f926afa3fabc18829c99",
"md5": "8298cca72b1fb4580658aa9783646c12",
"sha256": "16596ed9e6ccfe1375d091c9caa99200832a1bdf991d093a0395872bd2b0f96c"
},
"downloads": -1,
"filename": "logman-0.0.3.tar.gz",
"has_sig": false,
"md5_digest": "8298cca72b1fb4580658aa9783646c12",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.7",
"size": 7123,
"upload_time": "2024-07-25T11:15:31",
"upload_time_iso_8601": "2024-07-25T11:15:31.934870Z",
"url": "https://files.pythonhosted.org/packages/07/d1/ef19c3e557682300ef8cba4c6c264cf1a3e9e7d9f926afa3fabc18829c99/logman-0.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-25 11:15:31",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "WIM-Corporation",
"github_project": "logman",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"tox": true,
"lcname": "logman"
}