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 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.1.0.tar.gz.
File metadata
- Download URL: aklogger-0.1.0.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 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 |
71ab3c0e595460e0686b926a9ecac09ccb2e84c8e390bcb58381eb9800a0b340
|
|
| MD5 |
704834bded6e7fdc89a6bfedb18500b9
|
|
| BLAKE2b-256 |
6c651e07555aaa465915353a654f1f689f566b9ea6d7cdce27798edb8e10b5b6
|
File details
Details for the file aklogger-0.1.0-py2.py3-none-any.whl.
File metadata
- Download URL: aklogger-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 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 |
27e6c80d5cb7cc3f61b042ce36f7f77c02a222eb942838f8a38a38677f8e2c9b
|
|
| MD5 |
b9a7157b006a4841a5e710e1a0c0a82c
|
|
| BLAKE2b-256 |
4648bc61fe001e21616c06122313eb25c8de7d82aa9e23ee29ea4ee3896b838a
|