Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/licht1stein/blaster-logger
Turn-key logging based on loguru
https://github.com/licht1stein/blaster-logger
Last synced: 8 days ago
JSON representation
Turn-key logging based on loguru
- Host: GitHub
- URL: https://github.com/licht1stein/blaster-logger
- Owner: licht1stein
- Created: 2019-07-30T07:26:49.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-07-30T07:38:52.000Z (over 5 years ago)
- Last Synced: 2024-10-13T14:14:59.904Z (about 1 month ago)
- Language: Python
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Blaster Logger
Turn-key logging solution based on [loguru](https://github.com/Delgan/loguru)### Installation
```bash
pip install blaster_logger
```### Usage
#### As logger
```python
from blaster_logger import loglog.debug('This is DEBUG level message')
log.info('This is INFO level message')
log.warning('This is a warning')
log.error('This is an error message')
log.critical('This is a critical level message')try:
raise RuntimeError('Error message')
except RuntimeError as e:
log.trace(e) # This is a traceback log
```#### As decorator
```python
from blaster_logger import log@log.this
def some_func(x):
return x * 2
```