log-decor


Namelog-decor JSON
Version 2.0.5 PyPI version JSON
download
home_page
SummaryLogging decorators for functions and methods.
upload_time2023-04-17 18:37:40
maintainer
docs_urlNone
authorBernardo Paulsen
requires_python>=3.10,<4.0
licenseMIT
keywords logging decorator oop
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            log-decor
=========

Introduction
############

This package contains decorators that provide logging functionality for functions
and methods.

Example
#######

.. code-block:: python

    import logging

    from log_decor import add_logger, log_msg


    @add_logger()
    class Example:

        @log_msg('message', level=logging.DEBUG)
        def f1(self):
            pass

        @log_msg(level=logging.INFO)
        def f2(self):
            pass


>>> logging.basicConfig(level=logging.DEBUG)
>>> example = Example()
>>> example.f1()
DEBUG:Example:message
>>> example.f2()
INFO:Example:f2()

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "log-decor",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10,<4.0",
    "maintainer_email": "",
    "keywords": "logging,decorator,OOP",
    "author": "Bernardo Paulsen",
    "author_email": "paulsen.bernardo@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/20/20/39c40a4239df260659469a061505ee51e91cdca3e3874b84a96b138157b4/log_decor-2.0.5.tar.gz",
    "platform": null,
    "description": "log-decor\n=========\n\nIntroduction\n############\n\nThis package contains decorators that provide logging functionality for functions\nand methods.\n\nExample\n#######\n\n.. code-block:: python\n\n    import logging\n\n    from log_decor import add_logger, log_msg\n\n\n    @add_logger()\n    class Example:\n\n        @log_msg('message', level=logging.DEBUG)\n        def f1(self):\n            pass\n\n        @log_msg(level=logging.INFO)\n        def f2(self):\n            pass\n\n\n>>> logging.basicConfig(level=logging.DEBUG)\n>>> example = Example()\n>>> example.f1()\nDEBUG:Example:message\n>>> example.f2()\nINFO:Example:f2()\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Logging decorators for functions and methods.",
    "version": "2.0.5",
    "split_keywords": [
        "logging",
        "decorator",
        "oop"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "87d9239e26c53c52f5c61ec8c8a874ea196c65e5d404c388a0bd3b88824985e7",
                "md5": "ebba4d8d7aa2d928ebc725c434d384c3",
                "sha256": "ab044764469e960fca6b4ac235f7790e9227a7f90c9fb711f048677587177266"
            },
            "downloads": -1,
            "filename": "log_decor-2.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ebba4d8d7aa2d928ebc725c434d384c3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10,<4.0",
            "size": 5709,
            "upload_time": "2023-04-17T18:37:38",
            "upload_time_iso_8601": "2023-04-17T18:37:38.868582Z",
            "url": "https://files.pythonhosted.org/packages/87/d9/239e26c53c52f5c61ec8c8a874ea196c65e5d404c388a0bd3b88824985e7/log_decor-2.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "202039c40a4239df260659469a061505ee51e91cdca3e3874b84a96b138157b4",
                "md5": "b49fe88ef6f15177b65bfcb0c843c57c",
                "sha256": "f50f82ac75942830874050fded5142528aa5e76fdc1bd2c6f5bf2c54d947bd0d"
            },
            "downloads": -1,
            "filename": "log_decor-2.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "b49fe88ef6f15177b65bfcb0c843c57c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10,<4.0",
            "size": 3613,
            "upload_time": "2023-04-17T18:37:40",
            "upload_time_iso_8601": "2023-04-17T18:37:40.247058Z",
            "url": "https://files.pythonhosted.org/packages/20/20/39c40a4239df260659469a061505ee51e91cdca3e3874b84a96b138157b4/log_decor-2.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-17 18:37:40",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "log-decor"
}
        
Elapsed time: 0.66244s