Name | a-sane-logger JSON |
Version |
0.3
JSON |
| download |
home_page | None |
Summary | A simple logging configuration module |
upload_time | 2024-10-09 17:03:16 |
maintainer | None |
docs_url | None |
author | Alex Popescu |
requires_python | >=3.6 |
license | None |
keywords |
logging
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Sane Logger
This module provides a simple logging configuration with a named logger for Python applications.
The settings are `%(asctime)s [%(threadName)-12.12s] [%(levelname)-5.5s] %(message)s`.
## Installation
You can install the package using pip:
```bash
pip install a_sane_logger
```
# Usage
Simply import the module in your code and use the logger:
```python
import a_sane_logger as sn
logger = sn.sane_logger
logger.info("This is an info message.")
logger.error("This is an error message.")
```
The logs should look like:
```
2024-10-09 18:57:24,520 [MainThread ] [INFO ] This is an info message.
2024-10-09 18:57:26,204 [MainThread ] [ERROR] This is an error message.
```
Raw data
{
"_id": null,
"home_page": null,
"name": "a-sane-logger",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "logging",
"author": "Alex Popescu",
"author_email": "pop.alx@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/4f/b0/3e16296ade1b0add4b94cb25d411ae219b749bcc17d4978eb863166e1d23/a_sane_logger-0.3.tar.gz",
"platform": null,
"description": "# Sane Logger\r\n\r\nThis module provides a simple logging configuration with a named logger for Python applications.\r\n\r\nThe settings are `%(asctime)s [%(threadName)-12.12s] [%(levelname)-5.5s] %(message)s`.\r\n\r\n## Installation\r\n\r\nYou can install the package using pip:\r\n\r\n```bash\r\npip install a_sane_logger\r\n```\r\n\r\n# Usage\r\n\r\nSimply import the module in your code and use the logger:\r\n\r\n```python\r\nimport a_sane_logger as sn\r\n\r\nlogger = sn.sane_logger\r\n\r\nlogger.info(\"This is an info message.\")\r\nlogger.error(\"This is an error message.\")\r\n```\r\n\r\nThe logs should look like:\r\n\r\n```\r\n2024-10-09 18:57:24,520 [MainThread ] [INFO ] This is an info message.\r\n2024-10-09 18:57:26,204 [MainThread ] [ERROR] This is an error message.\r\n```\r\n",
"bugtrack_url": null,
"license": null,
"summary": "A simple logging configuration module",
"version": "0.3",
"project_urls": null,
"split_keywords": [
"logging"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "fa7130ef202a6d10f2c239c59dc05b93ccf556fe771010d7ec3ce67c8958927e",
"md5": "e79dd82721796329fb1c006abb4b3721",
"sha256": "0ef3ed45e1bcb7a464567a077391c440ae3653ddcf1caa6425c0a71521f184a1"
},
"downloads": -1,
"filename": "a_sane_logger-0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e79dd82721796329fb1c006abb4b3721",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 2179,
"upload_time": "2024-10-09T17:03:15",
"upload_time_iso_8601": "2024-10-09T17:03:15.211443Z",
"url": "https://files.pythonhosted.org/packages/fa/71/30ef202a6d10f2c239c59dc05b93ccf556fe771010d7ec3ce67c8958927e/a_sane_logger-0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4fb03e16296ade1b0add4b94cb25d411ae219b749bcc17d4978eb863166e1d23",
"md5": "63f8572cefb8c247cb002b264ada2b98",
"sha256": "336ba87ecab60ac798b2dda5a317ce61b9cae3833edb9c9a1c8b253892f56da4"
},
"downloads": -1,
"filename": "a_sane_logger-0.3.tar.gz",
"has_sig": false,
"md5_digest": "63f8572cefb8c247cb002b264ada2b98",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 1781,
"upload_time": "2024-10-09T17:03:16",
"upload_time_iso_8601": "2024-10-09T17:03:16.796773Z",
"url": "https://files.pythonhosted.org/packages/4f/b0/3e16296ade1b0add4b94cb25d411ae219b749bcc17d4978eb863166e1d23/a_sane_logger-0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-09 17:03:16",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "a-sane-logger"
}