{ "info": { "author": "Sander Smits", "author_email": "jhmsmits@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "=============================\ndjango-logutils\n=============================\n\n.. image:: https://badge.fury.io/py/django-logutils.png\n :target: https://badge.fury.io/py/django-logutils\n\n.. image:: https://travis-ci.org/jsmits/django-logutils.png?branch=master\n :target: https://travis-ci.org/jsmits/django-logutils\n\n.. image:: https://readthedocs.org/projects/django-logutils/badge/?version=latest\n :target: https://readthedocs.org/projects/django-logutils/?badge=latest\n :alt: Documentation Status\n\n.. image:: https://coveralls.io/repos/jsmits/django-logutils/badge.svg?branch=master&service=github\n :target: https://coveralls.io/github/jsmits/django-logutils?branch=master\n\nVarious logging-related utilities for Django projects. For now, it provides\na LoggingMiddleware class and an EventLogger class.\n\nDocumentation\n-------------\n\nhttp://django-logutils.readthedocs.org\n\nQuickstart\n----------\n\nInstall django-logutils::\n\n pip install django-logutils\n\nLoggingMiddleware\n-----------------\n\nLoggingMiddleware is middleware class for Django, that logs extra\nrequest-related information. To use it in your Django projects, add it to\nyour ``MIDDLEWARE_CLASSES`` setting::\n\n MIDDLEWARE_CLASSES = (\n ...\n 'django_logutils.middleware.LoggingMiddleware',\n ...\n )\n\nThe extra information consists of:\n\n- event (default: 'request')\n\n- remote ip address: the remote ip address of the user doing the request.\n\n- user email: the email address of the requesting user, if available\n\n- request method: post or get\n\n- request url path\n\n- response status code\n\n- content length of the response body\n\n- request time\n\nN.B.: event can be overriden by using the ``LOGUTILS_LOGGING_MIDDLEWARE_EVENT``\nsetting in your project.\n\nThe log message itself is a string composed of the remote ip address, the user\nemail, the request method, the request url, the status code, the content\nlength of the body and the request time. Additionally, a dictionary with the\nlog items are added as an extra keyword argument when sending a logging\nstatement.\n\nIf settings.DEBUG is True or the request time is more than 1 second, two\nadditional parameters are added to the logging dictionary: ``nr_queries`` that\nrepresents the number of queries executed during the request-response cycle\nand ``sql_time`` that represents the time it took to execute those queries.\nSlow requests are also raised to a loglevel of ``WARNING``.\n\nN.B.: the time threshold for slow requests can be overriden by using the\n``LOGUTILS_REQUEST_TIME_THRESHOLD`` setting in your project.\n\nEventLogger\n-----------\n\nThe EventLogger class makes it easy to create dictionary-based logging\nstatements, that can be used by log processors like Logstash. Log events can be\nused to track metrics and/or to create visualisations.\n\nHere's an example of how you can use it::\n\n >>> from django_logutils.utils import EventLogger\n >>> log_event = EventLogger('my_logger')\n >>> log_event('my_event', {'action': 'push_button'})\n\nDevelopment\n-----------\n\nInstall the test requirements::\n\n $ pip install -r requirements/test.txt\n\nRun the tests to check everything is fine::\n\n $ make test\n\nTo run the tests and opening the coverage html in your browser::\n\n $ make coverage\n\nTo run flake8 and pylint, do::\n\n $ make lint\n\nTo generate the documentation, do::\n\n $ make docs\n\n\n\n\nHistory\n-------\n\n\n0.4.3 (2017-05-11)\n++++++++++++++++++\n\n- Make sure that log messages are aggregable by tools like Sentry.\n\n\n0.4.2 (2015-10-30)\n++++++++++++++++++\n\n- Support StreamingHttpResponse that doesn't have content length. \n\n\n0.4.1 (2015-08-21)\n++++++++++++++++++\n\n- Add tests for app settings.\n\n\n0.4.0 (2015-08-20)\n++++++++++++++++++\n\n- Make ``REQUEST_TIME_THRESHOLD`` a setting.\n\n\n0.3.1 (2015-08-04)\n++++++++++++++++++\n\n- Update documentation.\n\n\n0.3.0 (2015-08-04)\n++++++++++++++++++\n\n- Add ``EventLogger`` class.\n\n\n0.2.5 (2015-07-31)\n++++++++++++++++++\n\n- Reach 100% test coverage.\n\n\n0.2.4 (2015-07-31)\n++++++++++++++++++\n\n- Improve project structure. \n\n\n0.2.3 (2015-07-30)\n++++++++++++++++++\n\n- Add ``log_event`` utility function for logging events. \n\n\n0.2.2 (2015-07-29)\n++++++++++++++++++\n\n- Add ``add_items_to_message`` utility function.\n\n\n0.2.1 (2015-07-29)\n++++++++++++++++++\n\n- More and better tests. \n\n\n0.2.0 (2015-07-28)\n++++++++++++++++++\n\n- Release replacing previous faulty dev release.\n\n\n0.1.0 (2015-07-28)\n++++++++++++++++++\n\n* First release on PyPI.\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jsmits/django-logutils", "keywords": "django-logutils", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "django-logutils", "package_url": "https://pypi.org/project/django-logutils/", "platform": "", "project_url": "https://pypi.org/project/django-logutils/", "project_urls": { "Homepage": "https://github.com/jsmits/django-logutils" }, "release_url": "https://pypi.org/project/django-logutils/0.4.3/", "requires_dist": [ "django", "django-appconf" ], "requires_python": "", "summary": "Various logging-related utilities for Django projects.", "version": "0.4.3" }, "last_serial": 2867661, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "3569470216caf3419c291b0d636cd00b", "sha256": "7c04eb5f922175e4f12b29a78963da23cbfc173202a01fe5e4128bb87a2ac1d3" }, "downloads": -1, "filename": "django-logutils-0.2.0.tar.gz", "has_sig": false, "md5_digest": "3569470216caf3419c291b0d636cd00b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7142, "upload_time": "2015-07-28T07:50:42", "url": "https://files.pythonhosted.org/packages/67/74/b31ce7b31292426365f19fe52c56676d0f8ae0d73b248b0dc0243adaff92/django-logutils-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "032618dc18da639330ea459984e67216", "sha256": "5a0a071dca7c4979c004697e75f0f1c8200991c7380627f749e30898cca5a61d" }, "downloads": -1, "filename": "django-logutils-0.2.1.tar.gz", "has_sig": false, "md5_digest": "032618dc18da639330ea459984e67216", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7194, "upload_time": "2015-07-29T07:01:57", "url": "https://files.pythonhosted.org/packages/09/89/75fe2091d21287db05ad6bde2ea499382cd4c2c2d0ee9a172044d6bc33fb/django-logutils-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "d6252a58c6deccc322c7a87fb666ed21", "sha256": "7ccad1208786795c826b70802801ebb3425d1c240c05037a4aeff6e4a006a9df" }, "downloads": -1, "filename": "django-logutils-0.2.2.tar.gz", "has_sig": false, "md5_digest": "d6252a58c6deccc322c7a87fb666ed21", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7338, "upload_time": "2015-07-29T15:24:48", "url": "https://files.pythonhosted.org/packages/bd/03/f5e8387b20d99c69fa288a8508bc445373d7c4278f9c67c0d965eb991c36/django-logutils-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "538126a78a99dda2d35a8516dc9de9fc", "sha256": "eb9ef884edaff25a868ea25c90e28fe2011a6a45e3002aa847338badcb8012e9" }, "downloads": -1, "filename": "django-logutils-0.2.3.tar.gz", "has_sig": false, "md5_digest": "538126a78a99dda2d35a8516dc9de9fc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7449, "upload_time": "2015-07-30T15:14:51", "url": "https://files.pythonhosted.org/packages/b3/97/d5c840a6318886f29cc6bddbdfe367190f237d8a66adeff729bef820861a/django-logutils-0.2.3.tar.gz" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "637a73c8ef7dc42ecd587a1a14c5070d", "sha256": "ac4413e12438df625547f3f43c181a2638846cb395b305138b01884ef510804e" }, "downloads": -1, "filename": "django_logutils-0.2.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "637a73c8ef7dc42ecd587a1a14c5070d", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 8307, "upload_time": "2015-07-31T08:15:29", "url": "https://files.pythonhosted.org/packages/a8/87/9074559f8e927ffcab25608cc7582f0d9444160dd3b30f0e07ba446ffb1e/django_logutils-0.2.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f8e7cc31d6e3e2bef44845e10773ad83", "sha256": "35427db3b7ed6022490df16dc881cecd669f5ea1aaeea743e0eb770a48f2e1aa" }, "downloads": -1, "filename": "django-logutils-0.2.4.tar.gz", "has_sig": false, "md5_digest": "f8e7cc31d6e3e2bef44845e10773ad83", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7405, "upload_time": "2015-07-31T08:15:25", "url": "https://files.pythonhosted.org/packages/ff/30/a730f4603899f5e830dfeea8fc0e4af315553be0b3628bf44dce633c6494/django-logutils-0.2.4.tar.gz" } ], "0.2.5": [ { "comment_text": "", "digests": { "md5": "0c305a654ff414cb03a6dd0c619a6fc9", "sha256": "08715b8ba6240129d4511559ded59c8bf884eebcef88c8b823d64f8e56f28725" }, "downloads": -1, "filename": "django_logutils-0.2.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0c305a654ff414cb03a6dd0c619a6fc9", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 8346, "upload_time": "2015-07-31T10:02:43", "url": "https://files.pythonhosted.org/packages/fa/e2/d253691b7bcf101352c4f8f263bc2f7157b9f35583275dcad61e161ea8c1/django_logutils-0.2.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a365207f8d034e290ea3ef5b3eeb84f5", "sha256": "02c9a38729a57ad6a12f0dbd095a66690c8e3c71cc3ba8656c819ca8ac139087" }, "downloads": -1, "filename": "django-logutils-0.2.5.tar.gz", "has_sig": false, "md5_digest": "a365207f8d034e290ea3ef5b3eeb84f5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7460, "upload_time": "2015-07-31T10:02:40", "url": "https://files.pythonhosted.org/packages/0e/95/9dfcd44ab9fd90b0ae12b43d78477fc0ffd40d92e95f6d427c55c2b2d0a0/django-logutils-0.2.5.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "b0ca90913b28cbdd764af11adda16897", "sha256": "ce3ced1cbd4126a4ef82a6c6b7f9480d84d0d766341dcd87b8cc9986772c09bc" }, "downloads": -1, "filename": "django_logutils-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b0ca90913b28cbdd764af11adda16897", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 8654, "upload_time": "2015-08-04T09:01:28", "url": "https://files.pythonhosted.org/packages/13/1a/9e2d2a74caf08148ac11b2f41b807857463f73ad8d97f419f0330f556c78/django_logutils-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a3ca5de4a499c9979f313d0cf5e521b4", "sha256": "da738bb19e52588364730992e59eb66f165e8c8ceef51e706a20474a68db5409" }, "downloads": -1, "filename": "django-logutils-0.3.0.tar.gz", "has_sig": false, "md5_digest": "a3ca5de4a499c9979f313d0cf5e521b4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7663, "upload_time": "2015-08-04T09:01:25", "url": "https://files.pythonhosted.org/packages/a7/30/7b9992f5801496ef496425a83768a032fd66d6e5398f8f5602f6aec9b6f1/django-logutils-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "36e618817a1b326e43b06cc5a5eec8ec", "sha256": "aaa47d585467affa904b02578e111a844307955706093d02447c09a0a5913bd7" }, "downloads": -1, "filename": "django_logutils-0.3.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "36e618817a1b326e43b06cc5a5eec8ec", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 9232, "upload_time": "2015-08-04T18:49:18", "url": "https://files.pythonhosted.org/packages/68/41/9c4f67d6a35e0461c3cd9b0aa490c8782283921760af2f30fee9f95ad4cb/django_logutils-0.3.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "51d3820881f9d6ff93f2c338d7d59170", "sha256": "92fe1d3b9557f28ffe71f7193da75af597cf4526f71b16ee74a707680947f3c4" }, "downloads": -1, "filename": "django-logutils-0.3.1.tar.gz", "has_sig": false, "md5_digest": "51d3820881f9d6ff93f2c338d7d59170", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8088, "upload_time": "2015-08-04T18:49:14", "url": "https://files.pythonhosted.org/packages/61/3f/23071792919dea42baf6db75cd3e3b1a5f4b08dbd2f13991e69529a65bd2/django-logutils-0.3.1.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "8fdc3522f196b988fc602cb406b72bc0", "sha256": "9a5c84b1bfb677fa91942663e179ee0bdec4f7243ecb66dfb7a08dc746d19676" }, "downloads": -1, "filename": "django_logutils-0.4.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8fdc3522f196b988fc602cb406b72bc0", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 9535, "upload_time": "2015-08-20T20:15:58", "url": "https://files.pythonhosted.org/packages/3b/a3/ddd5c14e4afedfb6dd506ea5a2b858ce185779ba16defdc3b6b8a0300d9a/django_logutils-0.4.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "62e71dabb593f71b2ff95dd39563c992", "sha256": "f282011e0a79f50a60c8053f8c03094034b5da924726249b0d6276883a327825" }, "downloads": -1, "filename": "django-logutils-0.4.0.tar.gz", "has_sig": false, "md5_digest": "62e71dabb593f71b2ff95dd39563c992", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8237, "upload_time": "2015-08-20T20:15:54", "url": "https://files.pythonhosted.org/packages/01/4b/bcc261ab1868ac45725340939b39e7cb50a433abf20a41ca28108c44cf0d/django-logutils-0.4.0.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "916f6d901f7e73f4701505774dd4c63d", "sha256": "1c81ce1bbc0d6751e0703ef4f138e6faf712d88c69006bb6ff70ddc0105329ad" }, "downloads": -1, "filename": "django_logutils-0.4.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "916f6d901f7e73f4701505774dd4c63d", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 9698, "upload_time": "2015-08-21T16:00:46", "url": "https://files.pythonhosted.org/packages/32/03/bdef526dce57c49bc8f0111dabb4fe95115fe216a5a827d2e989ff4623c8/django_logutils-0.4.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f04e2b18d6c11505d4a33bae7fd92df4", "sha256": "a66d31836229fcd68624a22ba36216f70adbac59b536c6635d3b96d5db211249" }, "downloads": -1, "filename": "django-logutils-0.4.1.tar.gz", "has_sig": false, "md5_digest": "f04e2b18d6c11505d4a33bae7fd92df4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8274, "upload_time": "2015-08-21T16:00:43", "url": "https://files.pythonhosted.org/packages/0b/8b/e1f85d394ebd9d6337ccac8fefc475e91159b2060099b0a40a067886e1ed/django-logutils-0.4.1.tar.gz" } ], "0.4.2": [ { "comment_text": "", "digests": { "md5": "8b140c51c4f7420d636bcd82abb60fef", "sha256": "848fe34a9482451e9a09b1105e8458a0e5ddb3536454f3709ebb63e96fecdfed" }, "downloads": -1, "filename": "django_logutils-0.4.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8b140c51c4f7420d636bcd82abb60fef", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 9817, "upload_time": "2015-10-30T21:51:15", "url": "https://files.pythonhosted.org/packages/bc/93/028c4324972b3e341b4147be82582b0813c0fa9f1234cf3354f81fcebdeb/django_logutils-0.4.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a2ab2d85e32bec3db1ac4d5a405a5c51", "sha256": "f75d18c86100398c4f5a3487c17fe70f703d525cb0e08b0d2170e7f2566c5a4f" }, "downloads": -1, "filename": "django-logutils-0.4.2.tar.gz", "has_sig": false, "md5_digest": "a2ab2d85e32bec3db1ac4d5a405a5c51", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8364, "upload_time": "2015-10-30T21:51:10", "url": "https://files.pythonhosted.org/packages/40/89/e27985c6bb667f6a16d1bbb516d89a16bb560a89189325a97fb13d3bf311/django-logutils-0.4.2.tar.gz" } ], "0.4.3": [ { "comment_text": "", "digests": { "md5": "b68424e1288f112b8b52dfad1516f9e5", "sha256": "1b07f28d6ac23b4677b06a5214b2b8d1742355259ee50a919d8dd6368567e527" }, "downloads": -1, "filename": "django_logutils-0.4.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b68424e1288f112b8b52dfad1516f9e5", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9674, "upload_time": "2017-05-11T18:16:03", "url": "https://files.pythonhosted.org/packages/06/28/35888c1e5828dc77e81d9e7670da76a6b6f370331e073440a61293eb86f3/django_logutils-0.4.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cc0ddba837cc9465294f42aca464c8d9", "sha256": "3452299c15c18bc389af950e3b247973862c165a9546e4d03b6d8c3c543fa715" }, "downloads": -1, "filename": "django-logutils-0.4.3.tar.gz", "has_sig": false, "md5_digest": "cc0ddba837cc9465294f42aca464c8d9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8353, "upload_time": "2017-05-11T18:16:05", "url": "https://files.pythonhosted.org/packages/4a/aa/b0d9bfe9c16a443723dc9c215dda5e8ad41a3116b2d9ee0b0f31c4d4f4e2/django-logutils-0.4.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b68424e1288f112b8b52dfad1516f9e5", "sha256": "1b07f28d6ac23b4677b06a5214b2b8d1742355259ee50a919d8dd6368567e527" }, "downloads": -1, "filename": "django_logutils-0.4.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b68424e1288f112b8b52dfad1516f9e5", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9674, "upload_time": "2017-05-11T18:16:03", "url": "https://files.pythonhosted.org/packages/06/28/35888c1e5828dc77e81d9e7670da76a6b6f370331e073440a61293eb86f3/django_logutils-0.4.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cc0ddba837cc9465294f42aca464c8d9", "sha256": "3452299c15c18bc389af950e3b247973862c165a9546e4d03b6d8c3c543fa715" }, "downloads": -1, "filename": "django-logutils-0.4.3.tar.gz", "has_sig": false, "md5_digest": "cc0ddba837cc9465294f42aca464c8d9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8353, "upload_time": "2017-05-11T18:16:05", "url": "https://files.pythonhosted.org/packages/4a/aa/b0d9bfe9c16a443723dc9c215dda5e8ad41a3116b2d9ee0b0f31c4d4f4e2/django-logutils-0.4.3.tar.gz" } ] }