# 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.
Raw data
{
"_id": null,
"home_page": "https://github.com/appknox/aklogger",
"name": "aklogger",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8,<4.0",
"maintainer_email": "",
"keywords": "appknox,logging,aklogger",
"author": "Appknox",
"author_email": "engineering@appknox.com",
"download_url": "https://files.pythonhosted.org/packages/0c/21/f212b53965efa009010a74b442c3c0a14346608c3a805f939e77a8cd9099/aklogger-0.2.2.tar.gz",
"platform": null,
"description": "# aklogger\n\nKeep track of all the events happening in your project: A generic logging package for python projects.\n\n## [Features]\n\n- Logging to console\n- Logging to file\n- Push logs to slack\n\n## Installation\n\n```\n$ pip install aklogger\n```\n\n## Usage\n\nFollowing script will log messages to slack, file and console:\n\n```python\nfrom aklogger import logger\n\nlogger.set_name('mycroft')\nlogger.setLevel('DEBUG')\n\n# This will log to console\nlogger.info('Some Dummy log', 'Some dummy details of the dummy log')\n\n# Enable File log\nlogger.log_to_file('file.log')\n\n# This will log to file and console\nlogger.info('Some Dummy log', 'Some dummy details of the dummy log')\n\n# Enable Slack\nlogger.enable_slack(SLACK_TOKEN)\n\n# Set slack level\nlogger.set_slack_level('WARNING')\n\n# Now the logs will be log to slack\nlogger.warning('Some Dummy log', 'Some dummy details of the dummy log')\n\n# You can also do a force push to slack no matter what the slack level is set.\nlogger.info('Dummy log', 'Details of the dummy log', force_push_slack=True)\n```\n\nSee [python logging docs](https://docs.python.org/3/library/logging.html) for more uses.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A generic logging package for python projects",
"version": "0.2.2",
"project_urls": {
"Homepage": "https://github.com/appknox/aklogger",
"Repository": "https://github.com/appknox/aklogger"
},
"split_keywords": [
"appknox",
"logging",
"aklogger"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1cfb71c01464cd0f98f9fd91c34129ee9cf3d051ad68886ba73ba6c0c3ed4e55",
"md5": "b585a65a9a79460efb874c1d4b8c3804",
"sha256": "2961ca8aa29c2db5aa0f43062088c885358f395ce97b1a11a5ecb2bf463fb2a3"
},
"downloads": -1,
"filename": "aklogger-0.2.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b585a65a9a79460efb874c1d4b8c3804",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8,<4.0",
"size": 4538,
"upload_time": "2023-10-18T04:10:32",
"upload_time_iso_8601": "2023-10-18T04:10:32.581229Z",
"url": "https://files.pythonhosted.org/packages/1c/fb/71c01464cd0f98f9fd91c34129ee9cf3d051ad68886ba73ba6c0c3ed4e55/aklogger-0.2.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0c21f212b53965efa009010a74b442c3c0a14346608c3a805f939e77a8cd9099",
"md5": "29e22c27edde3ccf486f24cea19dc765",
"sha256": "02b1e3a3e9cf5a38ca7ae0b9f0fb33ce3225218191b01b3223685a62de4c8652"
},
"downloads": -1,
"filename": "aklogger-0.2.2.tar.gz",
"has_sig": false,
"md5_digest": "29e22c27edde3ccf486f24cea19dc765",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8,<4.0",
"size": 3919,
"upload_time": "2023-10-18T04:10:34",
"upload_time_iso_8601": "2023-10-18T04:10:34.305712Z",
"url": "https://files.pythonhosted.org/packages/0c/21/f212b53965efa009010a74b442c3c0a14346608c3a805f939e77a8cd9099/aklogger-0.2.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-18 04:10:34",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "appknox",
"github_project": "aklogger",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "aklogger"
}