{ "info": { "author": "Vincent Poulailleau", "author_email": "vpoulailleau@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Utilities" ], "description": "# Simple Logging\n\n[![PyPI](https://img.shields.io/pypi/v/simplelogging.svg)](https://pypi.python.org/pypi/simplelogging)\n[![PyPI](https://img.shields.io/pypi/l/simplelogging.svg)](https://github.com/vpoulailleau/simplelogging/blob/master/LICENSE)\n[![Travis](https://img.shields.io/travis/vpoulailleau/simplelogging.svg)](https://travis-ci.org/vpoulailleau/simplelogging)\n[![ReadTheDocs](https://readthedocs.org/projects/simplelogging/badge/?version=latest)](https://simplelogging.readthedocs.io/en/latest/?badge=latest)\n[![Code style: Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)\n[![Downloads](https://pepy.tech/badge/simplelogging)](https://pepy.tech/project/simplelogging)\n[![Coverage Status](https://coveralls.io/repos/github/vpoulailleau/simplelogging/badge.svg?branch=master)](https://coveralls.io/github/vpoulailleau/simplelogging?branch=master)\n[![Maintainability](https://api.codeclimate.com/v1/badges/4ad8f1bef2c011e8a5ac/maintainability)](https://codeclimate.com/github/vpoulailleau/simplelogging/maintainability)\n\nLogging made simple, no excuse for any debug print call.\n\n* Free software: BSD 3-Clause license\n* Documentation: https://simplelogging.readthedocs.io.\n\n\n## Features\n\n* Logging management (debug, information or error messages)\n* Simple logging setup\n* Based on Python `logging` module of the standard library\n* Based on [colorlog](https://github.com/borntyping/python-colorlog) for colored log on console\n\nFor advanced users:\n\n* The provided logger is one of those from `logging`, this means it can be configured so that log messages are sent by email, HTTP, or any of the options available in https://docs.python.org/3/library/logging.handlers.html.\n* The StreamHandler and the associated Formatter are those provided by `colorlog`.\n\n## Example\n\n### Basic usage\n\n```python\nimport simplelogging\n\n# log = simplelogging.get_logger(console_level=simplelogging.DEBUG)\n# log = simplelogging.get_logger(file_name=\"log.txt\")\nlog = simplelogging.get_logger()\n\na_string_variable = \"hello\"\nan_integer_variable = 42\na_floating_point_variable = 3.14\n\nlog.debug(\"some debug\")\nlog.info(\"some info\")\nlog.info(\n \"some variables: %s, %d, %f\",\n a_string_variable,\n an_integer_variable,\n a_floating_point_variable,\n)\nlog.warning(\"some warning\")\nlog.error(\"some error\")\nlog.critical(\"some critical error\")\n\ntry:\n x = 1 / 0\nexcept ZeroDivisionError as error:\n log.exception(error)\n```\n\n![quickstart result](quickstart.png)\n\nKeep in mind that you shouldn't do string formatting yourself. Delegate formatting to `simplelogging` (i.e. `logging` in this case), the formatting will be done only if necessary, that is if the message is going to be displayed. See above examples of how to display variables.\n\n### Usage with modules\n\n#### example_module.py\n\n```python\nimport simplelogging\n\nlog = simplelogging.get_logger()\n\n\ndef log_some_messages():\n log.debug(\"## some debug ##\")\n log.info(\"## some info ##\")\n log.warning(\"## some warning ##\")\n log.error(\"## some error ##\")\n```\n\n#### main.py\n\n```python\nimport example_module\nimport simplelogging\n\n# log = simplelogging.get_logger(console_level=simplelogging.DEBUG)\n# log = simplelogging.get_logger(file_name=\"log.txt\")\nlog = simplelogging.get_logger()\n\na_variable = \"a nice variable\"\nanother_variable = 42\n\nlog.error(\"---- normal logging ----\")\nlog.debug(\"a debug message\")\nlog.info(\"an info\")\nlog.warning(\"a warning\")\nlog.error(\"%s and %d\", a_variable, another_variable)\n\nlog.error(\"---- example_module writes to the log ----\")\nexample_module.log_some_messages()\n\nlog.error(\"---- reduced logging (bye debug and info messages) ----\")\nlog.reduced_logging()\nlog.debug(\"a debug message\")\nlog.info(\"an info\")\nlog.warning(\"a warning\")\nlog.error(\"an error\")\n\nlog.error(\"---- full logging (welcome back debug and info messages) ----\")\nlog.full_logging()\nlog.debug(\"a debug message\")\nlog.info(\"an info\")\nlog.warning(\"a warning\")\nlog.error(\"an error\")\n```\n\n#### Result in the console\n\n\n![quickstart with modules result](with_modules.png)\n\nMore examples are provided in the documentation: https://simplelogging.readthedocs.io.\n\n## TODO\n\n* add tests\n* add type annotations\n* add docstring\n* commit hooks\n* describe pros/cons and alternatives\n* release 1.0!\n\n## Credits\n\nThis package is an extension of the [logging](https://docs.python.org/3/howto/logging-cookbook.html) package in the Python standard library. Coloring of the console relies on [colorlog](https://github.com/borntyping/python-colorlog).\n\nThis package was created with [Cookiecutter](https://github.com/audreyr/cookiecutter) and the [audreyr/cookiecutter-pypackage](https://github.com/audreyr/cookiecutter-pypackage) project template.\n\n\n## History\n\n### 0.10.0 (2019-09-16)\n\n* setup.py: require pytest-runner only when necessary\n* remove Python 3.4 support\n\n### 0.9.0 (2018-12-14)\n\n* Improve documentation\n* Add tests\n* Change API for easy logging level change\n\n### 0.8.0 (2018-12-09)\n\n* Improve documentation\n* Change default format: enlarge level size for critical errors\n\n### 0.7.0 (2018-12-08)\n\n* Fix logging to file\n\n### 0.6.0 (2018-12-07)\n\n* Colored output on console\n* Improved documentation\n\n### 0.5.0 (2018-12-02)\n\n* Fix README rendering in PyPI\n\n### 0.4.0 (2018-12-02)\n\n* Fix bump config\n\n### 0.3.0 (2018-12-02)\n\n* First release on PyPI.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/vpoulailleau/simplelogging", "keywords": "simplelogging", "license": "BSD license", "maintainer": "", "maintainer_email": "", "name": "simplelogging", "package_url": "https://pypi.org/project/simplelogging/", "platform": "", "project_url": "https://pypi.org/project/simplelogging/", "project_urls": { "Documentation": "https://simplelogging.readthedocs.io/en/latest/", "Homepage": "https://github.com/vpoulailleau/simplelogging", "Source": "https://github.com/vpoulailleau/simplelogging/", "Tracker": "https://github.com/vpoulailleau/simplelogging/issues" }, "release_url": "https://pypi.org/project/simplelogging/0.10.0/", "requires_dist": [ "colorlog (==4.0.2)" ], "requires_python": "", "summary": "Logging made simple, no excuse for any debug print call.", "version": "0.10.0" }, "last_serial": 5835830, "releases": { "0.10.0": [ { "comment_text": "", "digests": { "md5": "6ccfa39499f3ceab49cc099fcc3ce6a7", "sha256": "574e8fdaaecdc43a4cb932710126657b1c3c566594d22f2e04de1a6b56e56d9d" }, "downloads": -1, "filename": "simplelogging-0.10.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6ccfa39499f3ceab49cc099fcc3ce6a7", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5594, "upload_time": "2019-09-16T12:16:43", "url": "https://files.pythonhosted.org/packages/63/00/e173efe1df19b62a599b2c543245fc01976ce7cdc2c32f6d16c1288b8fd6/simplelogging-0.10.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e3f9da393098d8fd8ebd8349a00692f2", "sha256": "c070e0d82b68eff6918076a0edbf0a48b2c9a263854bd35f48a12c6adbbe9d80" }, "downloads": -1, "filename": "simplelogging-0.10.0.tar.gz", "has_sig": false, "md5_digest": "e3f9da393098d8fd8ebd8349a00692f2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 135468, "upload_time": "2019-09-16T12:16:45", "url": "https://files.pythonhosted.org/packages/17/85/3d2431f971e703916c7254e4560ed15451faedf2461eb484da9e1ebc5da6/simplelogging-0.10.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "545fcbf3c73b3fd8ebec16717f85c8ba", "sha256": "aebef064969c1cab5a9f660f0c4254e702a2b8f966f041ef3b46f533584f3f4b" }, "downloads": -1, "filename": "simplelogging-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "545fcbf3c73b3fd8ebec16717f85c8ba", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4401, "upload_time": "2018-12-02T19:49:14", "url": "https://files.pythonhosted.org/packages/ac/3c/e20a970d8e0c2ad14a10468848248fc8af164f61c5fb486abd83aadd6aa8/simplelogging-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a0318f99f337986f1edef4dbdedabe0d", "sha256": "019deecf5da091cd6e79ce02366ebce7a83391a492624bf63e191c74c065e514" }, "downloads": -1, "filename": "simplelogging-0.3.0.tar.gz", "has_sig": false, "md5_digest": "a0318f99f337986f1edef4dbdedabe0d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9376, "upload_time": "2018-12-02T19:49:16", "url": "https://files.pythonhosted.org/packages/37/ca/52eeea7ab646b098ba6333868466b464cddaa302a8e0065a48b402979273/simplelogging-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "d49a92d29c4411064595516e36385e64", "sha256": "a007cd1b20d6239305099270c1aa264b8889bd53edf593cf3086083ad4f15f60" }, "downloads": -1, "filename": "simplelogging-0.4.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d49a92d29c4411064595516e36385e64", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4417, "upload_time": "2018-12-02T20:10:34", "url": "https://files.pythonhosted.org/packages/22/10/3b48c7e230f0f23bec127fbc966bd152083e42cada3b1b27a59ec6f04925/simplelogging-0.4.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d424a804aad7f9efd1bb2c25d9752332", "sha256": "454e1d8f921e6f8b97dc3f2ab016afe7da8a3bd0b03f1b3c6730dcef23ee2aad" }, "downloads": -1, "filename": "simplelogging-0.4.0.tar.gz", "has_sig": false, "md5_digest": "d424a804aad7f9efd1bb2c25d9752332", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9393, "upload_time": "2018-12-02T20:10:36", "url": "https://files.pythonhosted.org/packages/c3/8a/ee4fe1b9c7abd848961e10a1ec44e7ce5acfdd51a57582cdfe3d37221ae5/simplelogging-0.4.0.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "4f7ebe3e8f6936bef08eb9c289fbc99b", "sha256": "77a522063d9c7893eb362772928c644bbb2d1f44c8dfec3554b257e7969cecfb" }, "downloads": -1, "filename": "simplelogging-0.5.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4f7ebe3e8f6936bef08eb9c289fbc99b", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4457, "upload_time": "2018-12-02T20:17:14", "url": "https://files.pythonhosted.org/packages/88/99/a299752010d769cb98d6e50e6e68e7bc8e8312ff8643ec3c3dd722bd705b/simplelogging-0.5.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "09549175275c91259684c6bc44c29810", "sha256": "91e93bf2160f6f4dcf405f79d9c267d9c2e246085e8eea5481d6101c9c9ffa8d" }, "downloads": -1, "filename": "simplelogging-0.5.0.tar.gz", "has_sig": false, "md5_digest": "09549175275c91259684c6bc44c29810", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9387, "upload_time": "2018-12-02T20:17:16", "url": "https://files.pythonhosted.org/packages/d7/64/99e29b1d3e1b646301e57c3f443cecc4d1bafaf9a9ddaec2b564b46cabd3/simplelogging-0.5.0.tar.gz" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "23deaf0ee6fb2b973801fd3f94b63774", "sha256": "d955441eda424c7d1347c84a1c2a942b5cd4c65edb26be562c0cde983a5fcc7d" }, "downloads": -1, "filename": "simplelogging-0.6.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "23deaf0ee6fb2b973801fd3f94b63774", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4666, "upload_time": "2018-12-07T16:50:26", "url": "https://files.pythonhosted.org/packages/e2/9f/2fbe78dd6a5081fe091893e957973cbaecba21b4b767496159e805e010c8/simplelogging-0.6.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8a9c9858499a2b35c78d2ea97822cb0b", "sha256": "8bfff56e7fb3a67fd9fb6968c94076e92d3d71a756136364145b10e6d0215eb8" }, "downloads": -1, "filename": "simplelogging-0.6.0.tar.gz", "has_sig": false, "md5_digest": "8a9c9858499a2b35c78d2ea97822cb0b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14525, "upload_time": "2018-12-07T16:50:29", "url": "https://files.pythonhosted.org/packages/1e/37/4e0decb75e4b84ff553c22067f33ce6d4b28f4c771094c2ab9d08c18cb5d/simplelogging-0.6.0.tar.gz" } ], "0.7.0": [ { "comment_text": "", "digests": { "md5": "7841621b99b00fbf0f0a42dcc8913dfc", "sha256": "23305ec7a341eaea3084f7670747767d771e90e2e03e184d706d8face92b0c6c" }, "downloads": -1, "filename": "simplelogging-0.7.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7841621b99b00fbf0f0a42dcc8913dfc", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4964, "upload_time": "2018-12-08T16:00:36", "url": "https://files.pythonhosted.org/packages/81/2b/9cd7802e9a63225308ef9ce02579a868131a88efa7634f7e343655dc231c/simplelogging-0.7.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b28c78e815ded2c1651bb86c95722594", "sha256": "194ea3b20d72c2cc4cde13fffcf3f271120574ed0f8ddcb0e0da945fdaf17792" }, "downloads": -1, "filename": "simplelogging-0.7.0.tar.gz", "has_sig": false, "md5_digest": "b28c78e815ded2c1651bb86c95722594", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14899, "upload_time": "2018-12-08T16:00:38", "url": "https://files.pythonhosted.org/packages/5f/bc/5ea4cae4ea178b2f3be8214db0c794af8727dfa57d9e1cbc2454c5860cf5/simplelogging-0.7.0.tar.gz" } ], "0.8.0": [ { "comment_text": "", "digests": { "md5": "af33604e83d200503590e7363ced030c", "sha256": "dbef4650ead396a0bb935f62cc1e188a968d8463187db8dc08063406f12dca0e" }, "downloads": -1, "filename": "simplelogging-0.8.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "af33604e83d200503590e7363ced030c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4968, "upload_time": "2018-12-09T16:19:49", "url": "https://files.pythonhosted.org/packages/2f/a6/cd1bdd2d90c3d2d35e038e7cd05d41735815474bc2449ac709eb8ecb5d0f/simplelogging-0.8.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a6ca4388308049c45a855a42d3f83567", "sha256": "2450b7a7711509ae5b0775ef41131a708bcd715ca4eb3335b67cb5e833cbe9c8" }, "downloads": -1, "filename": "simplelogging-0.8.0.tar.gz", "has_sig": false, "md5_digest": "a6ca4388308049c45a855a42d3f83567", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 130611, "upload_time": "2018-12-09T16:19:50", "url": "https://files.pythonhosted.org/packages/21/ad/e315de0ff68939e42b123555f4cf69c702690f490cc3430ef18ca50b3f77/simplelogging-0.8.0.tar.gz" } ], "0.9.0": [ { "comment_text": "", "digests": { "md5": "09899d59e3d002155559d3aaab5e8174", "sha256": "22993d92338d6835946c1a86c3603445c90f303ca20630a8148ea54938a07010" }, "downloads": -1, "filename": "simplelogging-0.9.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "09899d59e3d002155559d3aaab5e8174", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5338, "upload_time": "2018-12-14T12:35:35", "url": "https://files.pythonhosted.org/packages/5d/c0/0cf8f7a33d45b1090f39ffe9ba4eea7d1862f014ef2f28940aa41763826e/simplelogging-0.9.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "eff71a30ae71983ba749d62b2d911653", "sha256": "df41ee3701ee3346fb903d08874287d9d44857c53f5bbf81fa8997737d23ed2e" }, "downloads": -1, "filename": "simplelogging-0.9.0.tar.gz", "has_sig": false, "md5_digest": "eff71a30ae71983ba749d62b2d911653", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 132662, "upload_time": "2018-12-14T12:35:36", "url": "https://files.pythonhosted.org/packages/1b/68/ac3cf9165475f612c8fff80263df1ef542c27f35285010732040217a4da4/simplelogging-0.9.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6ccfa39499f3ceab49cc099fcc3ce6a7", "sha256": "574e8fdaaecdc43a4cb932710126657b1c3c566594d22f2e04de1a6b56e56d9d" }, "downloads": -1, "filename": "simplelogging-0.10.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6ccfa39499f3ceab49cc099fcc3ce6a7", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5594, "upload_time": "2019-09-16T12:16:43", "url": "https://files.pythonhosted.org/packages/63/00/e173efe1df19b62a599b2c543245fc01976ce7cdc2c32f6d16c1288b8fd6/simplelogging-0.10.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e3f9da393098d8fd8ebd8349a00692f2", "sha256": "c070e0d82b68eff6918076a0edbf0a48b2c9a263854bd35f48a12c6adbbe9d80" }, "downloads": -1, "filename": "simplelogging-0.10.0.tar.gz", "has_sig": false, "md5_digest": "e3f9da393098d8fd8ebd8349a00692f2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 135468, "upload_time": "2019-09-16T12:16:45", "url": "https://files.pythonhosted.org/packages/17/85/3d2431f971e703916c7254e4560ed15451faedf2461eb484da9e1ebc5da6/simplelogging-0.10.0.tar.gz" } ] }