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.2.tar.gz
(3.9 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.2.tar.gz.
File metadata
- Download URL: aklogger-0.2.2.tar.gz
- Upload date:
- Size: 3.9 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 |
02b1e3a3e9cf5a38ca7ae0b9f0fb33ce3225218191b01b3223685a62de4c8652
|
|
| MD5 |
29e22c27edde3ccf486f24cea19dc765
|
|
| BLAKE2b-256 |
0c21f212b53965efa009010a74b442c3c0a14346608c3a805f939e77a8cd9099
|
File details
Details for the file aklogger-0.2.2-py3-none-any.whl.
File metadata
- Download URL: aklogger-0.2.2-py3-none-any.whl
- Upload date:
- Size: 4.5 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 |
2961ca8aa29c2db5aa0f43062088c885358f395ce97b1a11a5ecb2bf463fb2a3
|
|
| MD5 |
b585a65a9a79460efb874c1d4b8c3804
|
|
| BLAKE2b-256 |
1cfb71c01464cd0f98f9fd91c34129ee9cf3d051ad68886ba73ba6c0c3ed4e55
|