Skip to main content

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


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.2.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aklogger-0.1.2-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file aklogger-0.1.2.tar.gz.

File metadata

  • Download URL: aklogger-0.1.2.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.1 Darwin/18.7.0

File hashes

Hashes for aklogger-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f91d1e73bae194a4a07b79f832e1a36267ff750e10b628a24e070370dc45f669
MD5 c0ee790750ff5647d15ae74e92c43029
BLAKE2b-256 f6ec766a05ffef3393c288b547541a96a9f18282bf5fac84b6b412b8976ae493

See more details on using hashes here.

File details

Details for the file aklogger-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: aklogger-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.1 Darwin/18.7.0

File hashes

Hashes for aklogger-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e06ede399a9d9608cba5ff9f92d6be45b6de907ef17043580bc504f355373f52
MD5 e594970282de095eef934d497a72eddb
BLAKE2b-256 b4cfd5582597ff56ed397819c85ca492e68e05e739f4bcb144f2f25b9ab1e20b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page