Neatlogger


NameNeatlogger JSON
Version 0.1.2 PyPI version JSON
download
home_pagehttps://github.com/mschroen/neatlogger
SummaryNeat adaptions to the loguru package which wraps logging in python.
upload_time2024-11-22 09:09:22
maintainerNone
docs_urlNone
authorMartin Schrön
requires_python>3.9
licenseMIT
keywords logging
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Neatlogger
[![PyPi Version](https://img.shields.io/pypi/v/neatlogger.svg)](https://pypi.python.org/pypi/neatlogger/)
[![MIT License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/mschroen/neatlogger/blob/main/LICENSE)
[![Issues](https://img.shields.io/github/issues-raw/mschroen/neatlogger.svg?maxAge=25000)](https://github.com/mschroen/neatlogger/issues)  
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/c6/b8/3b3e9454d198e0833c487bd462f58810755c4d5c7f8aba7a465dbf3c5e05/neatlogger-0.1.2.tar.gz",
    "platform": null,
    "description": "# Neatlogger\n[![PyPi Version](https://img.shields.io/pypi/v/neatlogger.svg)](https://pypi.python.org/pypi/neatlogger/)\n[![MIT License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/mschroen/neatlogger/blob/main/LICENSE)\n[![Issues](https://img.shields.io/github/issues-raw/mschroen/neatlogger.svg?maxAge=25000)](https://github.com/mschroen/neatlogger/issues)  \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\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Neat adaptions to the loguru package which wraps logging in python.",
    "version": "0.1.2",
    "project_urls": {
        "Homepage": "https://github.com/mschroen/neatlogger",
        "Repository": "https://github.com/mschroen/neatlogger"
    },
    "split_keywords": [
        "logging"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fcb7ee5ed21e04fe8ac215dbc02bffcb0b6999d1b0c16805c5c3d9d72fd1ef77",
                "md5": "0d10b4cd2b31de3510a785e9d496c85e",
                "sha256": "b7db9af8958939d2b8be133b9ef9f81b8948cb9c8f6f95d61cf7bd23751064d8"
            },
            "downloads": -1,
            "filename": "neatlogger-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0d10b4cd2b31de3510a785e9d496c85e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">3.9",
            "size": 4348,
            "upload_time": "2024-11-22T09:09:21",
            "upload_time_iso_8601": "2024-11-22T09:09:21.418134Z",
            "url": "https://files.pythonhosted.org/packages/fc/b7/ee5ed21e04fe8ac215dbc02bffcb0b6999d1b0c16805c5c3d9d72fd1ef77/neatlogger-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c6b83b3e9454d198e0833c487bd462f58810755c4d5c7f8aba7a465dbf3c5e05",
                "md5": "4cae7e4960dabbc90d4c6b98314f3062",
                "sha256": "67698315498515f4e0938953176fde93f739144d9f32660f7453a3c94611bdcf"
            },
            "downloads": -1,
            "filename": "neatlogger-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "4cae7e4960dabbc90d4c6b98314f3062",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">3.9",
            "size": 3098,
            "upload_time": "2024-11-22T09:09:22",
            "upload_time_iso_8601": "2024-11-22T09:09:22.987887Z",
            "url": "https://files.pythonhosted.org/packages/c6/b8/3b3e9454d198e0833c487bd462f58810755c4d5c7f8aba7a465dbf3c5e05/neatlogger-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-22 09:09:22",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mschroen",
    "github_project": "neatlogger",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "neatlogger"
}
        
Elapsed time: 0.39970s