A generic logging package for python projects
Project description
# aklogger
Keep track of all the events happening in your project: A generic logging package for python projects.
## [Features]
- Logging to console
- Logging to file
- Push logs to slack
## Installation
```
$ pip install aklogger
```
## Usage
Following script will log messages to slack, file and console:
```python
import aklogger
token = SLACK_API_KEY
channel = CHANNEL_NAME
logger = aklogger.AKLogger('test', level='DEBUG')
f_handler = aklogger.handlers.FileHandler('test.log')
c_handler = aklogger.handlers.StreamHandler()
s_handler = aklogger.handlers.SlackerLogHandler(token, channel)
logger.add_handler(f_handler)
logger.add_handler(c_handler)
logger.add_handler(s_handler)
logger.error('This is title', 'This is description')
```
See [python logging docs](https://docs.python.org/3/library/logging.html) for more uses.
Keep track of all the events happening in your project: A generic logging package for python projects.
## [Features]
- Logging to console
- Logging to file
- Push logs to slack
## Installation
```
$ pip install aklogger
```
## Usage
Following script will log messages to slack, file and console:
```python
import aklogger
token = SLACK_API_KEY
channel = CHANNEL_NAME
logger = aklogger.AKLogger('test', level='DEBUG')
f_handler = aklogger.handlers.FileHandler('test.log')
c_handler = aklogger.handlers.StreamHandler()
s_handler = aklogger.handlers.SlackerLogHandler(token, channel)
logger.add_handler(f_handler)
logger.add_handler(c_handler)
logger.add_handler(s_handler)
logger.error('This is title', 'This is description')
```
See [python logging docs](https://docs.python.org/3/library/logging.html) for more uses.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aklogger-0.0.2a1.tar.gz
(3.6 kB
view hashes)
Built Distribution
Close
Hashes for aklogger-0.0.2a1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9fc4427a2c474bf44d9575ef42c23ee9bd1c407eb3579a25a13447f978ac726 |
|
MD5 | bfa21cf6097c1769fb08aaaaf264b5b3 |
|
BLAKE2b-256 | 17904e6e05b54e44211618d1a0a80bd4bdc86a56954813675b95687ce8141be2 |