Name | shushlog JSON |
Version |
0.1.1
JSON |
| download |
home_page | |
Summary | Simple logs supressor and filter |
upload_time | 2023-10-03 06:20:22 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.10 |
license | GPL-3.0-or-later |
keywords |
logging
suppress
filter
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# shushlog
![PyPI](https://img.shields.io/pypi/v/shushlog?logo=python)
![PyPI - License](https://img.shields.io/pypi/l/shushlog)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/shushlog)
[![pdm-managed](https://img.shields.io/badge/pdm-managed-blueviolet)](https://pdm.fming.dev)
Async-compatible, dependency-less, simple log suppression and filtering lib
## Install
```shell
pip install shushlog
```
## TLDR
- supress all logs
```python
>>> import logging
>>> import shush
>>> logging.basicConfig()
>>> logger = logging.getLogger("some_logger")
>>> logger.setLevel(logging.INFO)
>>> @shush.suppress
>>> def suppressed_func():
>>> logger.info("this should not be logged")
>>> def normal_func():
>>> logger.info("this should be logged")
>>> suppressed_func()
>>> normal_func()
INFO:some_logger:this should be logged
```
- muzzle text
```python
>>> import logging
>>> import shush
>>> logging.basicConfig()
>>> logger = logging.getLogger("some_logger")
>>> logger.setLevel(logging.INFO)
>>> @shush.muzzle("foo")
>>> def muzzled_func():
>>> logger.info("this contains `foo`, so it should be muzzled out")
>>> logger.info("this doesn't contain it, so it should be showing")
>>> muzzled_func()
INFO:some_logger:this doesn't contain it, so it should be showing
```
Raw data
{
"_id": null,
"home_page": "",
"name": "shushlog",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "",
"keywords": "logging suppress filter",
"author": "",
"author_email": "c\u0103t\u0103lin <catalin@roboces.dev>",
"download_url": "https://files.pythonhosted.org/packages/fa/4e/a7d94b2e11a6e20d42a82ca9b0842aae35424446754da45ec73720d37052/shushlog-0.1.1.tar.gz",
"platform": null,
"description": "# shushlog\n\n![PyPI](https://img.shields.io/pypi/v/shushlog?logo=python)\n![PyPI - License](https://img.shields.io/pypi/l/shushlog)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/shushlog)\n[![pdm-managed](https://img.shields.io/badge/pdm-managed-blueviolet)](https://pdm.fming.dev)\n\n\nAsync-compatible, dependency-less, simple log suppression and filtering lib\n\n## Install\n\n```shell\npip install shushlog\n```\n\n## TLDR\n\n- supress all logs\n\n```python\n>>> import logging\n>>> import shush\n>>> logging.basicConfig()\n>>> logger = logging.getLogger(\"some_logger\")\n>>> logger.setLevel(logging.INFO)\n>>> @shush.suppress\n>>> def suppressed_func():\n>>> logger.info(\"this should not be logged\")\n>>> def normal_func():\n>>> logger.info(\"this should be logged\")\n>>> suppressed_func()\n>>> normal_func()\nINFO:some_logger:this should be logged\n```\n\n- muzzle text\n```python\n>>> import logging\n>>> import shush\n>>> logging.basicConfig()\n>>> logger = logging.getLogger(\"some_logger\")\n>>> logger.setLevel(logging.INFO)\n>>> @shush.muzzle(\"foo\")\n>>> def muzzled_func():\n>>> logger.info(\"this contains `foo`, so it should be muzzled out\")\n>>> logger.info(\"this doesn't contain it, so it should be showing\")\n>>> muzzled_func()\nINFO:some_logger:this doesn't contain it, so it should be showing\n```\n",
"bugtrack_url": null,
"license": "GPL-3.0-or-later",
"summary": "Simple logs supressor and filter",
"version": "0.1.1",
"project_urls": {
"Changelog": "https://git.roboces.dev/catalin/shushlog",
"Documentation": "https://git.roboces.dev/catalin/shushlog",
"Homepage": "https://git.roboces.dev/catalin/shushlog",
"Repository": "https://git.roboces.dev/catalin/shushlog"
},
"split_keywords": [
"logging",
"suppress",
"filter"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c1c74d028d86d1704903e15d0a0d7e2315d6d3b6a2df0484023fe5949c966af9",
"md5": "445631dc7691760c918148942abb9f9b",
"sha256": "3f0a5dd6c879dc85d498550d88c2ea728ecb1882b2199a269a2202dc33699cf0"
},
"downloads": -1,
"filename": "shushlog-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "445631dc7691760c918148942abb9f9b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 15271,
"upload_time": "2023-10-03T06:20:20",
"upload_time_iso_8601": "2023-10-03T06:20:20.922195Z",
"url": "https://files.pythonhosted.org/packages/c1/c7/4d028d86d1704903e15d0a0d7e2315d6d3b6a2df0484023fe5949c966af9/shushlog-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "fa4ea7d94b2e11a6e20d42a82ca9b0842aae35424446754da45ec73720d37052",
"md5": "0b0fd2764a95c77698988a67aaf65273",
"sha256": "1eb3d43cdd2454b3f2724f6940350f15b8bcc005ae39c737767e3a79176602d4"
},
"downloads": -1,
"filename": "shushlog-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "0b0fd2764a95c77698988a67aaf65273",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 14562,
"upload_time": "2023-10-03T06:20:22",
"upload_time_iso_8601": "2023-10-03T06:20:22.403192Z",
"url": "https://files.pythonhosted.org/packages/fa/4e/a7d94b2e11a6e20d42a82ca9b0842aae35424446754da45ec73720d37052/shushlog-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-03 06:20:22",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "shushlog"
}