Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/trisongz/pylogz
Super basic logger used in personal projects.
https://github.com/trisongz/pylogz
Last synced: about 2 months ago
JSON representation
Super basic logger used in personal projects.
- Host: GitHub
- URL: https://github.com/trisongz/pylogz
- Owner: trisongz
- License: mit
- Created: 2021-12-03T09:29:05.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-12-04T00:16:22.000Z (about 3 years ago)
- Last Synced: 2024-10-08T01:17:35.696Z (3 months ago)
- Language: Python
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pylogz
Super basic logger used in personal projects.---
Why should you use this? You probably shouldn't.
---
## Quickstart
```bash
pip install --upgrade pylogz
```## Usage
```python
from logz import get_loggerlogger = get_logger(name='libname', log_level='info', *args, **kwargs)
logger.info('...')### Multi lib usage, threadsafe-ish
from logz import get_cls_logger
get_logger = get_cls_logger(name='libname_1', log_level='info', *args, **kwargs)
get_logger2 = get_cls_logger(name='libname_2', log_level='info', *args, **kwargs)# Now you can call the get_logger function from any submodule.
logger = get_logger()
logger.info('hi')
"""
2021-12-03 03:36:26Z [libname_1] . hi
"""logger2 = get_logger2()
logger2.info('hi')
"""
2021-12-03 03:36:26Z [libname_2] . hi
"""
```