# Shadowlogger
Simple wrapper for built-in logger module which intercepts all logs and shadows them, preventing sensitive information from being leaked.
---
![img.png](img.png)
[![Upload Python Package](https://github.com/Capsize-Games/shadowlogger/actions/workflows/python-publish.yml/badge.svg)](https://github.com/Capsize-Games/shadowlogger/actions/workflows/python-publish.yml)
---
## Installation
```bash
pip install shadowlogger
```
---
## Usage
```python
import shadowlogger
# Activate shadowlogger
shadowlogger.manager.install()
# Deactivate shadowlogger
shadowlogger.manager.uninstall()
```
or
```python
from shadowlogger.shadowlogger import ShadowLogger
class MyCustomLogger(ShadowLogger):
# override these to customize the logger
prefix: str
name: str
message_format: str
log_level: int
# override this to handle the formatted message
def handle_message(self, formatted_message: str, level_name: str):
pass
```
---
## Testing
```bash
python -m unittest discover -s tests
```
Raw data
{
"_id": null,
"home_page": "https://github.com/Capsize-Games/shadowlogger",
"name": "shadowlogger",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10.0",
"maintainer_email": null,
"keywords": null,
"author": "Capsize LLC",
"author_email": "contact@capsizegames.com",
"download_url": "https://files.pythonhosted.org/packages/a5/af/3c233234d2838abf9d49774c53ad98d3b8f67fe4831a97d5f527ce0f63bd/shadowlogger-0.1.1.tar.gz",
"platform": null,
"description": "# Shadowlogger\n\nSimple wrapper for built-in logger module which intercepts all logs and shadows them, preventing sensitive information from being leaked.\n\n---\n\n![img.png](img.png)\n\n[![Upload Python Package](https://github.com/Capsize-Games/shadowlogger/actions/workflows/python-publish.yml/badge.svg)](https://github.com/Capsize-Games/shadowlogger/actions/workflows/python-publish.yml)\n\n---\n\n## Installation\n\n```bash\npip install shadowlogger\n```\n\n---\n\n## Usage\n\n```python\nimport shadowlogger\n\n# Activate shadowlogger\nshadowlogger.manager.install()\n\n# Deactivate shadowlogger\nshadowlogger.manager.uninstall()\n```\n\nor \n\n```python\nfrom shadowlogger.shadowlogger import ShadowLogger\n\n\nclass MyCustomLogger(ShadowLogger):\n # override these to customize the logger\n prefix: str\n name: str\n message_format: str\n log_level: int\n \n # override this to handle the formatted message\n def handle_message(self, formatted_message: str, level_name: str):\n pass\n```\n\n---\n\n## Testing\n\n```bash\npython -m unittest discover -s tests\n```\n",
"bugtrack_url": null,
"license": "GPL-3.0",
"summary": null,
"version": "0.1.1",
"project_urls": {
"Homepage": "https://github.com/Capsize-Games/shadowlogger"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ccfa0c4f9afc0429d013a35f6770ed06696afc59007f9b70d7d074ec1caa6763",
"md5": "d3404983c20c5380258aca8f4044e7ee",
"sha256": "8b739feaf1007c14d31b8e0d71913e30720c36c202da8daddb2974c524d32a26"
},
"downloads": -1,
"filename": "shadowlogger-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d3404983c20c5380258aca8f4044e7ee",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10.0",
"size": 19255,
"upload_time": "2024-04-25T17:37:28",
"upload_time_iso_8601": "2024-04-25T17:37:28.155547Z",
"url": "https://files.pythonhosted.org/packages/cc/fa/0c4f9afc0429d013a35f6770ed06696afc59007f9b70d7d074ec1caa6763/shadowlogger-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a5af3c233234d2838abf9d49774c53ad98d3b8f67fe4831a97d5f527ce0f63bd",
"md5": "98fae8e0f975a76ac7c61f0101af05c2",
"sha256": "d5e6358007fa961038411ca9a146ca52f077b1672f6d5ac30985dfb27d757a2a"
},
"downloads": -1,
"filename": "shadowlogger-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "98fae8e0f975a76ac7c61f0101af05c2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10.0",
"size": 19742,
"upload_time": "2024-04-25T17:37:31",
"upload_time_iso_8601": "2024-04-25T17:37:31.128633Z",
"url": "https://files.pythonhosted.org/packages/a5/af/3c233234d2838abf9d49774c53ad98d3b8f67fe4831a97d5f527ce0f63bd/shadowlogger-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-25 17:37:31",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Capsize-Games",
"github_project": "shadowlogger",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "shadowlogger"
}