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:

```python
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](https://docs.python.org/3/library/logging.html) 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.1.tar.gz (3.8 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.1-py2.py3-none-any.whl (5.3 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: aklogger-0.1.1.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5

File hashes

Hashes for aklogger-0.1.1.tar.gz
Algorithm Hash digest
SHA256 933687fa8ef81e99ddbd71b0c5fb3882034d167e6ce09ed03055f2284e4d9ced
MD5 f5edf34785caa5860c38fc0263d9e195
BLAKE2b-256 37de00a3bb1a43dc924bd81e506e842b5d43daae1c181ee134a7996f8de480a7

See more details on using hashes here.

File details

Details for the file aklogger-0.1.1-py2.py3-none-any.whl.

File metadata

  • Download URL: aklogger-0.1.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5

File hashes

Hashes for aklogger-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 bb12d299ba2bc4d20708c46112cf19c117010aa8e01b6872e522a4e83171b88c
MD5 677cc3595823b128b41fc15172f08c84
BLAKE2b-256 a68d8cfaf6ccda86e9607e93943b5195f413b555264c4c825248fad3c529e602

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