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 details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aklogger-0.0.1a1.tar.gz.
File metadata
- Download URL: aklogger-0.0.1a1.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2ccaf11174240afb8a78a34a07e62c4bcb4ef95a108a95bfd96d47bcb9ea76c
|
|
| MD5 |
910bcdecda8566fa8181a0a666d2d837
|
|
| BLAKE2b-256 |
217000509ee02ee3d832eae08abb6a3f5cc35d9ee5e1b472d734c9f616514a54
|
File details
Details for the file aklogger-0.0.1a1-py2.py3-none-any.whl.
File metadata
- Download URL: aklogger-0.0.1a1-py2.py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5599fe8df6f02af3919674e556a70128c03b75b58695f48efae32085d652d667
|
|
| MD5 |
a11b09c4f12b6ff4f5f5add9572c4582
|
|
| BLAKE2b-256 |
c14e4a4537a0b371fbea04aa30bc875957c36f62a60cf9de7632dc56caec478f
|