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')
logger.info('Some Dummy log', 'Some dummy details of the dummy log')
logger.log_to_file('file.log')
logger.info('Some Dummy log', 'Some dummy details of the dummy log')
logger.enable_slack(SLACK_TOKEN)
logger.set_slack_level('WARNING')
logger.warning('Some Dummy log', 'Some dummy details of the dummy log')
logger.info('Dummy log', 'Details of the dummy log', force_push_slack=True)
See python logging docs for more uses.