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.1.0.tar.gz
(3.6 kB
view hashes)
Built Distribution
Close
Hashes for aklogger-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27e6c80d5cb7cc3f61b042ce36f7f77c02a222eb942838f8a38a38677f8e2c9b |
|
MD5 | b9a7157b006a4841a5e710e1a0c0a82c |
|
BLAKE2b-256 | 4648bc61fe001e21616c06122313eb25c8de7d82aa9e23ee29ea4ee3896b838a |