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:
from aklogger import logger
logger.set_name('mycroft')
logger.setLevel('DEBUG')
# This will log to console
logger.info('Some Dummy log', 'Some dummy details of the dummy log')
# Enable File log
logger.log_to_file('file.log')
# This will log to file and console
logger.info('Some Dummy log', 'Some dummy details of the dummy log')
# Enable Slack
logger.enable_slack(SLACK_TOKEN)
# Set slack level
logger.set_slack_level('WARNING')
# Now the logs will be log to slack
logger.warning('Some Dummy log', 'Some dummy details of the dummy log')
# You can also do a force push to slack no matter what the slack level is set.
logger.info('Dummy log', 'Details of the dummy log', force_push_slack=True)
See python logging docs 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.2.1.tar.gz
(4.0 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.2.1.tar.gz.
File metadata
- Download URL: aklogger-0.2.1.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.5 Darwin/21.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b581ff80b430b60215ec044c8b1e8c15ec45167347b94e4af77a8047f2ccf90
|
|
| MD5 |
5cff855dabe04133725888586bc750b7
|
|
| BLAKE2b-256 |
a7526ec80bf0eaaedc84685d18e08b3f6d699fc01c455f8478aaa14f4d4c9e35
|
File details
Details for the file aklogger-0.2.1-py3-none-any.whl.
File metadata
- Download URL: aklogger-0.2.1-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.5 Darwin/21.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2439de480dfd36c998ec2223857506f29996b90c8e6254f1bf173fbfe3a9eef7
|
|
| MD5 |
120c41b234bfc115d1e3eccc68195ae4
|
|
| BLAKE2b-256 |
0b7cf96e9452bbe276a0ccd57b5e9fef88a89869928b3775940e77db4e0d9e22
|