{ "info": { "author": "I\u00f1aki Silanes Crist\u00f3bal", "author_email": "isilanes@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "logworks is a convenience wrapper for the logging Python module. It is useful for me and the work I do at IHCantabria. \n\nI make it public with best wishes, but no implication is made about its potential utility and usability for others. logworks is distributed as free software, under the GPLv3.\n\n\n## Some examples\n\nNOTE: GitHub's markdown parser discards some HTML. As a result, the outputs below lack color.\n\n### Default\n\n```python\nfrom logworks import logworks\n\nlogger = logworks.Logger()\n\nlogger.debug(\"Verbose debug\")\nlogger.info(\"This is some info\")\nlogger.ok(\"Everything is ok\")\nlogger.warning(\"Danger! Danger!\")\nlogger.error(\"Something went wrong\")\n```\n\nYields the following (your exact colors may vary). Note debug text is not logged.\n\n
\n2018-04-11 12:10:35 [INFO] This is some info\n2018-04-11 12:10:35 [OK] Everything is ok\n2018-04-11 12:10:35 [WARNING] Danger! Danger!\n2018-04-11 12:10:35 [ERROR] Something went wrong\n
\n\n### Debug\n\n```python\nimport logging\nfrom logworks import logworks\n\nlogger = logworks.Logger(level=logging.DEBUG)\n\nlogger.debug(\"Verbose debug\")\n```\n\nYields (now it logs debug). Note that default color for debug is no color.\n\n
\n2018-04-11 12:10:35 [DEBUG] Verbose debug\n
\n\n### No colors\n\n```python\nfrom logworks import logworks\n\nlogger = logworks.Logger(use_color=False)\n\nlogger.info(\"This is some info\")\nlogger.ok(\"Everything is ok\")\nlogger.warning(\"Danger! Danger!\")\nlogger.error(\"Something went wrong\")\n```\n\nYields:\n\n
\n2018-04-11 12:10:35 [INFO] This is some info\n2018-04-11 12:10:35 [OK] Everything is ok\n2018-04-11 12:10:35 [WARNING] Danger! Danger!\n2018-04-11 12:10:35 [ERROR] Something went wrong\n
\n\n### Custom formatter\n\n```python\nimport logging\nfrom logworks import logworks\n\nmyformatter = logging.Formatter(\n fmt='{clevelname} - {asctime} - {message}',\n datefmt=\"%H:%M:%S\",\n style=\"{\"\n)\n\nlogger = logworks.Logger(console_formatter=myformatter)\n\nlogger.info(\"This is some custom info\")\n```\n\nYields:\n\n
\n[INFO] - 12:10:35 - This is some custom info\n
\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/isilanes/logworks", "keywords": "logging", "license": "", "maintainer": "", "maintainer_email": "", "name": "logworks", "package_url": "https://pypi.org/project/logworks/", "platform": "", "project_url": "https://pypi.org/project/logworks/", "project_urls": { "Homepage": "https://github.com/isilanes/logworks" }, "release_url": "https://pypi.org/project/logworks/0.7.6/", "requires_dist": null, "requires_python": "", "summary": "logworks is a convenience wrapper for the logging Python module.", "version": "0.7.6" }, "last_serial": 3887798, "releases": { "0.7.6": [ { "comment_text": "", "digests": { "md5": "a6850f8e58949df35ed68661f3be7de2", "sha256": "77a69f01fa25e311f11151967af130439170c14322a30ad63d8cfef337be1dac" }, "downloads": -1, "filename": "logworks-0.7.6-py3-none-any.whl", "has_sig": false, "md5_digest": "a6850f8e58949df35ed68661f3be7de2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5831, "upload_time": "2018-05-22T13:48:14", "url": "https://files.pythonhosted.org/packages/d6/89/c11e062ccd2860e06db8787c88b8ad630339d7807081e5f1d076bef52c83/logworks-0.7.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b2ad0f871a75ffec33780635fccf83d3", "sha256": "e297107fe88f50dba36d2ce75ae7d1247386e6d1474cb439340097e26bdaec1f" }, "downloads": -1, "filename": "logworks-0.7.6.tar.gz", "has_sig": false, "md5_digest": "b2ad0f871a75ffec33780635fccf83d3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18593, "upload_time": "2018-05-22T13:48:15", "url": "https://files.pythonhosted.org/packages/54/43/3a95a86056b411f7639a058340f89cbf8b04eeef953db39efe80c694de97/logworks-0.7.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a6850f8e58949df35ed68661f3be7de2", "sha256": "77a69f01fa25e311f11151967af130439170c14322a30ad63d8cfef337be1dac" }, "downloads": -1, "filename": "logworks-0.7.6-py3-none-any.whl", "has_sig": false, "md5_digest": "a6850f8e58949df35ed68661f3be7de2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5831, "upload_time": "2018-05-22T13:48:14", "url": "https://files.pythonhosted.org/packages/d6/89/c11e062ccd2860e06db8787c88b8ad630339d7807081e5f1d076bef52c83/logworks-0.7.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b2ad0f871a75ffec33780635fccf83d3", "sha256": "e297107fe88f50dba36d2ce75ae7d1247386e6d1474cb439340097e26bdaec1f" }, "downloads": -1, "filename": "logworks-0.7.6.tar.gz", "has_sig": false, "md5_digest": "b2ad0f871a75ffec33780635fccf83d3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18593, "upload_time": "2018-05-22T13:48:15", "url": "https://files.pythonhosted.org/packages/54/43/3a95a86056b411f7639a058340f89cbf8b04eeef953db39efe80c694de97/logworks-0.7.6.tar.gz" } ] }