Metadata-Version: 2.1
Name: shushlog
Version: 0.0.0
Summary: Simple logs supressor and filter
Author-email: cătălin <catalin@roboces.dev>
License: GPL-3.0-or-later
Project-URL: Homepage, https://git.roboces.dev/catalin/shushlog
Project-URL: Repository, https://git.roboces.dev/catalin/shushlog
Project-URL: Documentation, https://git.roboces.dev/catalin/shushlog
Project-URL: Changelog, https://git.roboces.dev/catalin/shushlog
Keywords: logging,suppress,filter
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Natural Language :: English
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: lint
Requires-Dist: black >=23.9.1 ; extra == 'lint'
Requires-Dist: ruff >=0.0.292 ; extra == 'lint'
Provides-Extra: linters
Requires-Dist: mypy >=1.5.1 ; extra == 'linters'
Requires-Dist: pyright >=1.1.329 ; extra == 'linters'
Provides-Extra: test
Requires-Dist: pytest >=7.4.2 ; extra == 'test'
Requires-Dist: anyio[trio] >=4.0.0 ; extra == 'test'
Requires-Dist: pytest-cov >=4.1.0 ; extra == 'test'

# 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

## 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")
    >>> @shush.suppress
    >>> 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\n
```
