# minilog
A minimalistic logging wrapper for Python.
[![Unix Build Status](https://img.shields.io/travis/com/jacebrowning/minilog.svg?label=unix)](https://travis-ci.com/jacebrowning/minilog)
[![Windows Build Status](https://img.shields.io/appveyor/ci/jacebrowning/minilog.svg?label=windows)](https://ci.appveyor.com/project/jacebrowning/minilog)
[![Coverage Status](https://img.shields.io/coveralls/jacebrowning/minilog/main.svg)](https://coveralls.io/r/jacebrowning/minilog)
[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/jacebrowning/minilog.svg)](https://scrutinizer-ci.com/g/jacebrowning/minilog)
[![PyPI License](https://img.shields.io/pypi/l/minilog.svg)](https://pypi.org/project/minilog)
[![PyPI Version](https://img.shields.io/pypi/v/minilog.svg)](https://pypi.org/project/minilog)
[![PyPI Downloads](https://img.shields.io/pypi/dm/minilog.svg?color=orange)](https://pypistats.org/packages/minilog)
## Usage
Every project should utilize logging, but for simple use cases, this requires a bit too much boilerplate. Instead of including all of this in your modules:
```python
import logging
log = logging.getLogger(__name__)
def greet(name):
log.info("Hello, %s!", name)
if __name__ == "__main__":
logging.basicConfig(
level=logging.INFO,
format="%(levelname)s: %(name)s: %(message)s",
)
```
with this package you can simply:
```python
import log
def greet(name):
log.info("Hello, %s!", name)
if __name__ == "__main__":
log.init()
```
It will produce the exact same standard library `logging` records behind the scenes with automatic formatting for non-strings.
## Installation
Install this library directly into an activated virtual environment:
```text
$ pip install minilog
```
or add it to your [Poetry](https://poetry.eustace.io/) project:
```text
$ poetry add minilog
```
## Documentation
To view additional options, please consult the [full documentation](https://minilog.readthedocs.io/en/latest/logging/).
Raw data
{
"_id": null,
"home_page": "https://pypi.org/project/minilog",
"name": "minilog",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8,<4.0",
"maintainer_email": "",
"keywords": "logging",
"author": "Jace Browning",
"author_email": "jacebrowning@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/6f/1c/282c452173d663e9697074e676212121b5a3eb574dae78197ccdd6eba85e/minilog-2.3.tar.gz",
"platform": null,
"description": "# minilog\n\nA minimalistic logging wrapper for Python.\n\n[![Unix Build Status](https://img.shields.io/travis/com/jacebrowning/minilog.svg?label=unix)](https://travis-ci.com/jacebrowning/minilog)\n[![Windows Build Status](https://img.shields.io/appveyor/ci/jacebrowning/minilog.svg?label=windows)](https://ci.appveyor.com/project/jacebrowning/minilog)\n[![Coverage Status](https://img.shields.io/coveralls/jacebrowning/minilog/main.svg)](https://coveralls.io/r/jacebrowning/minilog)\n[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/jacebrowning/minilog.svg)](https://scrutinizer-ci.com/g/jacebrowning/minilog)\n[![PyPI License](https://img.shields.io/pypi/l/minilog.svg)](https://pypi.org/project/minilog)\n[![PyPI Version](https://img.shields.io/pypi/v/minilog.svg)](https://pypi.org/project/minilog)\n[![PyPI Downloads](https://img.shields.io/pypi/dm/minilog.svg?color=orange)](https://pypistats.org/packages/minilog)\n\n## Usage\n\nEvery project should utilize logging, but for simple use cases, this requires a bit too much boilerplate. Instead of including all of this in your modules:\n\n```python\nimport logging\n\nlog = logging.getLogger(__name__)\n\ndef greet(name):\n log.info(\"Hello, %s!\", name)\n\nif __name__ == \"__main__\":\n logging.basicConfig(\n level=logging.INFO,\n format=\"%(levelname)s: %(name)s: %(message)s\",\n )\n```\n\nwith this package you can simply:\n\n```python\nimport log\n\ndef greet(name):\n log.info(\"Hello, %s!\", name)\n\nif __name__ == \"__main__\":\n log.init()\n```\n\nIt will produce the exact same standard library `logging` records behind the scenes with automatic formatting for non-strings.\n\n## Installation\n\nInstall this library directly into an activated virtual environment:\n\n```text\n$ pip install minilog\n```\n\nor add it to your [Poetry](https://poetry.eustace.io/) project:\n\n```text\n$ poetry add minilog\n```\n\n## Documentation\n\nTo view additional options, please consult the [full documentation](https://minilog.readthedocs.io/en/latest/logging/).\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Minimalistic wrapper for Python logging.",
"version": "2.3",
"project_urls": {
"Documentation": "https://minilog.readthedocs.io",
"Homepage": "https://pypi.org/project/minilog",
"Repository": "https://github.com/jacebrowning/minilog"
},
"split_keywords": [
"logging"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "94279f5767e05e8a0d69994013558ce44df1a9faf744932c53cdf87606863782",
"md5": "bf7aff0d7f801e9796b42f4b39456f21",
"sha256": "e42dc2def1da424e90d6664279c128dde94adc5840557b27857957ed23ee09b6"
},
"downloads": -1,
"filename": "minilog-2.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "bf7aff0d7f801e9796b42f4b39456f21",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8,<4.0",
"size": 8905,
"upload_time": "2023-12-09T17:43:40",
"upload_time_iso_8601": "2023-12-09T17:43:40.206676Z",
"url": "https://files.pythonhosted.org/packages/94/27/9f5767e05e8a0d69994013558ce44df1a9faf744932c53cdf87606863782/minilog-2.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "6f1c282c452173d663e9697074e676212121b5a3eb574dae78197ccdd6eba85e",
"md5": "b62832fd2e8702e6625a74f2bb317d34",
"sha256": "ebdf354f1dd86a2e8a824cdde4b7b50cdbc24b99a5465bc4d1806bd1e030bc92"
},
"downloads": -1,
"filename": "minilog-2.3.tar.gz",
"has_sig": false,
"md5_digest": "b62832fd2e8702e6625a74f2bb317d34",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8,<4.0",
"size": 7255,
"upload_time": "2023-12-09T17:43:41",
"upload_time_iso_8601": "2023-12-09T17:43:41.994740Z",
"url": "https://files.pythonhosted.org/packages/6f/1c/282c452173d663e9697074e676212121b5a3eb574dae78197ccdd6eba85e/minilog-2.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-12-09 17:43:41",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "jacebrowning",
"github_project": "minilog",
"travis_ci": true,
"coveralls": true,
"github_actions": false,
"appveyor": true,
"lcname": "minilog"
}