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.1a1.tar.gz
(5.5 kB
view hashes)
Built Distribution
Close
Hashes for aklogger-0.0.1a1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5599fe8df6f02af3919674e556a70128c03b75b58695f48efae32085d652d667 |
|
MD5 | a11b09c4f12b6ff4f5f5add9572c4582 |
|
BLAKE2b-256 | c14e4a4537a0b371fbea04aa30bc875957c36f62a60cf9de7632dc56caec478f |