{ "info": { "author": "Peter Lauri", "author_email": "peterlauri@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Operating System :: Unix", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Utilities" ], "description": "========\r\nOverview\r\n========\r\n\r\n\r\n\r\nPython logging formatter that prefix multiline log message and trackebacks. Makes the logs more readable, both for\r\ntracebacks and for multiline log messages.\r\n\r\n* Free software: BSD license\r\n\r\nBenchmarking\r\n============\r\n\r\nBenchmark against pythons built in formatter **logging.Formatter**. The benchmark is done using **pytest-benchmark**,\r\nand the below results is from a run on a faily new MacBook Pro, using Python 2.7.\r\n\r\nOne should note that we are using StringIO as stream output, so we should expect the results to be even closer with\r\nmore production alike setup, for example writing to disc.\r\n\r\n.. image:: https://raw.github.com/peterlauri/python-multiline-log-formatter/master/docs/benchmark.png\r\n :alt: python-redis-lock flow diagram\r\n\r\nInstallation\r\n============\r\n\r\n.. code-block:: bash\r\n\r\n pip install multiline-log-formatter\r\n\r\nUsage\r\n=====\r\n\r\nAdd this to dictConfig:\r\n\r\n.. code-block:: python\r\n\r\n 'formatters': {\r\n 'default': {\r\n '()': 'multiline_formatter.formatter.MultilineMessagesFormatter',\r\n 'format': '[%(levelname)s] %(message)s'\r\n },\r\n },\r\n\r\nAnd log messages will look like this:\r\n\r\n.. code-block:: bash\r\n\r\n [ERROR] LOGGING_MESSAGE ... (49564:MainThread)\r\n ... (49564:MainThread) : Traceback (most recent call last):\r\n ... (49564:MainThread) : File \"/Users/plauri/work/opensource/python-multiline-log-formatter/tests/test_multiline_formatter.py\", line 112, in test_exception\r\n ... (49564:MainThread) : raise Exception('EXCEPTION_MESSAGE')\r\n ... (49564:MainThread) : Exception: EXCEPTION_MESSAGE\r\n\r\nAnd if you don't like the default, you can customize it by extending **MultilineMessagesFormatter** and set\r\n**multiline_marker**. You can also change **multiline_fmt**, but assure you include **%(message)s** in the formating\r\nstring.\r\n\r\nDocumentation\r\n=============\r\n\r\nhttps://python-multiline-log-formatter.readthedocs.org/\r\n\r\nDevelopment\r\n===========\r\n\r\nTo run the all tests run::\r\n\r\n tox\r\n\r\n\r\nOther\r\n=====\r\n\r\nThis project sceleton is generated by ionelmc's pylibrary_ cookiecutter.\r\n\r\n.. _pylibrary: https://github.com/ionelmc/cookiecutter-pylibrary\r\n\r\n\r\n\r\nChangelog\r\n=========\r\n\r\n0.1.8 (2016-01-15)\r\n-----------------------------------------\r\n\r\n* First release on PyPI.", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/peterlauri/python-multiline-log-formatter", "keywords": "logs,logging", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "multiline-log-formatter", "package_url": "https://pypi.org/project/multiline-log-formatter/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/multiline-log-formatter/", "project_urls": { "Homepage": "https://github.com/peterlauri/python-multiline-log-formatter" }, "release_url": "https://pypi.org/project/multiline-log-formatter/0.1.8/", "requires_dist": null, "requires_python": "", "summary": "Python logging formatter that prefix multiline log message and trackebacks.", "version": "0.1.8" }, "last_serial": 1905788, "releases": { "0.1.8": [ { "comment_text": "", "digests": { "md5": "c9e40db2e0c944b5ae709f1da4f98bf4", "sha256": "b0fc09278ffa79b25a036af7974bd5b42c31b1a9a09d11076245cae36048fd75" }, "downloads": -1, "filename": "multiline_log_formatter-0.1.8-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c9e40db2e0c944b5ae709f1da4f98bf4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5452, "upload_time": "2016-01-15T09:01:22", "url": "https://files.pythonhosted.org/packages/54/d3/9b4c66cb433963afead0528d8fc62b5c454ae0786c4bedad7a2882b981f9/multiline_log_formatter-0.1.8-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cafcca8176e60236e12fd19301ea286e", "sha256": "0889b13f6079d62fa8952f33f65c364ce0a37be5f202dc9ea3d20df137ab2151" }, "downloads": -1, "filename": "multiline-log-formatter-0.1.8.tar.gz", "has_sig": false, "md5_digest": "cafcca8176e60236e12fd19301ea286e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 306559, "upload_time": "2016-01-15T09:01:30", "url": "https://files.pythonhosted.org/packages/fd/78/1d2b3b2223782764437a0aba6edb82e63f0fe1fb3bdbada97a7890c798ee/multiline-log-formatter-0.1.8.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c9e40db2e0c944b5ae709f1da4f98bf4", "sha256": "b0fc09278ffa79b25a036af7974bd5b42c31b1a9a09d11076245cae36048fd75" }, "downloads": -1, "filename": "multiline_log_formatter-0.1.8-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c9e40db2e0c944b5ae709f1da4f98bf4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5452, "upload_time": "2016-01-15T09:01:22", "url": "https://files.pythonhosted.org/packages/54/d3/9b4c66cb433963afead0528d8fc62b5c454ae0786c4bedad7a2882b981f9/multiline_log_formatter-0.1.8-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cafcca8176e60236e12fd19301ea286e", "sha256": "0889b13f6079d62fa8952f33f65c364ce0a37be5f202dc9ea3d20df137ab2151" }, "downloads": -1, "filename": "multiline-log-formatter-0.1.8.tar.gz", "has_sig": false, "md5_digest": "cafcca8176e60236e12fd19301ea286e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 306559, "upload_time": "2016-01-15T09:01:30", "url": "https://files.pythonhosted.org/packages/fd/78/1d2b3b2223782764437a0aba6edb82e63f0fe1fb3bdbada97a7890c798ee/multiline-log-formatter-0.1.8.tar.gz" } ] }