# Neatlogger
Neat adaptions to the loguru package which wraps logging in python.
## Idea
This wrapper around loguru shortcuts your way to more simple usage of loggers, especially useful in small, production-ready scripts:
- Provides the shorthand `log` instead of `logger`
- Provides new levels: `NEW`, `PROGRESS`, `READ`, `WRITE`, `DONE`.
- Formats logger outputs more cleanly, skips unnecessary information.
## Example usage:
```python
from neatlogger import log
log.new("Welcome to my script")
log.trace("Some minor tracing message")
x = 42
log.debug("Let's debug value x={}", x)
log.info("By the way, it's going well so far.")
log.progress("Heavy calculation ahead...")
log.read("Reading in some data...")
log.write("Writing some output file...")
log.warning("Note that writing files could take some time!")
try:
x / 0
except Exception as e:
log.error("An error occured: {}", e)
log.success("Yey, found a solution to the problem eventually.")
log.done("")
```
![Example output](https://github.com/mschroen/neatlogger/blob/main/docs/example_output.png)
## Install
```bash
pip install neatlogger
```
Requires:
- loguru
Raw data
{
"_id": null,
"home_page": "https://github.com/mschroen/neatlogger",
"name": "Neatlogger",
"maintainer": null,
"docs_url": null,
"requires_python": ">3.9",
"maintainer_email": null,
"keywords": "logging",
"author": "Martin Schr\u00f6n",
"author_email": "martin@schroen.eu",
"download_url": "https://files.pythonhosted.org/packages/49/8f/962f488d543e5423cfdda22bb15f57957ab41f8d78feb57fbd131144ab26/neatlogger-0.1.0.tar.gz",
"platform": null,
"description": "# Neatlogger\n\nNeat adaptions to the loguru package which wraps logging in python.\n\n## Idea\n\nThis wrapper around loguru shortcuts your way to more simple usage of loggers, especially useful in small, production-ready scripts:\n- Provides the shorthand `log` instead of `logger` \n- Provides new levels: `NEW`, `PROGRESS`, `READ`, `WRITE`, `DONE`.\n- Formats logger outputs more cleanly, skips unnecessary information.\n\n## Example usage:\n\n```python\nfrom neatlogger import log\n\nlog.new(\"Welcome to my script\")\nlog.trace(\"Some minor tracing message\")\nx = 42\nlog.debug(\"Let's debug value x={}\", x)\nlog.info(\"By the way, it's going well so far.\")\nlog.progress(\"Heavy calculation ahead...\")\nlog.read(\"Reading in some data...\")\nlog.write(\"Writing some output file...\")\nlog.warning(\"Note that writing files could take some time!\")\ntry:\n x / 0\nexcept Exception as e:\n log.error(\"An error occured: {}\", e)\nlog.success(\"Yey, found a solution to the problem eventually.\")\nlog.done(\"\")\n```\n\n![Example output](https://github.com/mschroen/neatlogger/blob/main/docs/example_output.png)\n\n## Install\n\n```bash\npip install neatlogger\n```\n\nRequires:\n- loguru",
"bugtrack_url": null,
"license": "MIT",
"summary": "Neat adaptions to the loguru package which wraps logging in python.",
"version": "0.1.0",
"project_urls": {
"Homepage": "https://github.com/mschroen/neatlogger",
"Repository": "https://github.com/mschroen/neatlogger"
},
"split_keywords": [
"logging"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "59f32ce2e06f02908d1bd756212da56c11d8a005ded1e27368990b1a761cd2ca",
"md5": "073e1aa710d2c25f93cbb395be6eece5",
"sha256": "f4caa1324a9c9f6743d99e6215d1d37a244464df028f38a8687901e6563a006b"
},
"downloads": -1,
"filename": "neatlogger-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "073e1aa710d2c25f93cbb395be6eece5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">3.9",
"size": 4158,
"upload_time": "2024-11-01T14:15:36",
"upload_time_iso_8601": "2024-11-01T14:15:36.209512Z",
"url": "https://files.pythonhosted.org/packages/59/f3/2ce2e06f02908d1bd756212da56c11d8a005ded1e27368990b1a761cd2ca/neatlogger-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "498f962f488d543e5423cfdda22bb15f57957ab41f8d78feb57fbd131144ab26",
"md5": "fbc3843264a60aa4b60cebd902e98935",
"sha256": "cc40ebcca4ca1fa46a4ee20ab99db74ae1431320e36f02bf4e50220ab290c04c"
},
"downloads": -1,
"filename": "neatlogger-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "fbc3843264a60aa4b60cebd902e98935",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">3.9",
"size": 2902,
"upload_time": "2024-11-01T14:15:38",
"upload_time_iso_8601": "2024-11-01T14:15:38.022027Z",
"url": "https://files.pythonhosted.org/packages/49/8f/962f488d543e5423cfdda22bb15f57957ab41f8d78feb57fbd131144ab26/neatlogger-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-01 14:15:38",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "mschroen",
"github_project": "neatlogger",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "neatlogger"
}