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.0.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.0.tar.gz.
File metadata
- Download URL: aklogger-0.2.0.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 |
df49267afa05683ad1e0637f9baf4a94adcea94edc942dc5e0a054d4f0faea3a
|
|
| MD5 |
fdfe7c0efd13fa90eaa4089eec6ea9c5
|
|
| BLAKE2b-256 |
4c30b10e85d05d49ceacaffc49575dc820d72886a7b8e08e96a6aeca00605dbe
|
File details
Details for the file aklogger-0.2.0-py3-none-any.whl.
File metadata
- Download URL: aklogger-0.2.0-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 |
d3029fe91bec48c53b9c6867b742a28c3226731dc3db78726c1d5d544f963add
|
|
| MD5 |
6cc67c900d36db35bdd4fafa42fe72d4
|
|
| BLAKE2b-256 |
3ab4b423c61d44df3fbb0a542bdbf4f161c2e9015d78e6994b3cc916bb8e6a40
|