{ "info": { "author": "Joey Wilhelm", "author_email": "tarkatronic@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "django-requestlogging\n=====================\n\n.. image:: https://img.shields.io/pypi/v/django-requestlogging-redux.svg\n :target: https://pypi.python.org/pypi/django-requestlogging-redux\n :alt: Latest Version\n\n.. image:: https://travis-ci.org/tarkatronic/django-requestlogging.svg?branch=master\n :target: https://travis-ci.org/tarkatronic/django-requestlogging\n :alt: Test/build status\n\n.. image:: https://codecov.io/gh/tarkatronic/django-requestlogging/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/tarkatronic/django-requestlogging\n :alt: Code coverage\n\nThis package provides a logging filter and middleware to add\ninformation about the current request to the logging record.\n\n\nInstallation and Usage\n----------------------\n\nInstall the package, add ``django_requestlogging`` to\n``settings.INSTALLED_APPS``, add\n``django_requestlogging.middleware.LogSetupMiddleware`` to\n``settings.MIDDLEWARE_CLASSES``, and add\n``django_requestlogging.logging_filters.RequestFilter`` as a logging\nfilter. See below for an example logging configuration.\n\nThe filter adds information about the current request to the logging\nrecord. The following keys can be substituted in the logging\nformatter string:\n\n ``http_user_agent``\n The user agent string, provided by the client.\n\n ``path_info``\n The requested HTTP path.\n\n ``remote_addr``\n The remote IP address.\n\n ``request_method``\n The HTTP request method (*e.g.* GET, POST, PUT, DELETE, *etc.*)\n\n ``server_protocol``\n The server protocol (*e.g.* HTTP, HTTPS, *etc.*)\n\n ``username``\n The username for the logged-in user.\n\nIf any of this information cannot be extracted from the current\nrequest (or there is no current request), a hyphen ``'-'`` is\nsubstituted as a placeholder.\n\n\nLogging Configuration Example\n-----------------------------\n\nThis logging configuration can be added to your\n``DJANGO_SETTINGS_MODULE``. It adds an unbound RequestFilter,\nwhich will be bound to the current request by the middleware and then\nunbound again at response time.\n::\n\n LOGGING = {\n 'filters': {\n # Add an unbound RequestFilter.\n 'request': {\n '()': 'django_requestlogging.logging_filters.RequestFilter',\n },\n },\n 'formatters': {\n 'request_format': {\n 'format': '%(remote_addr)s %(username)s \"%(request_method)s '\n '%(path_info)s %(server_protocol)s\" %(http_user_agent)s '\n '%(message)s %(asctime)s',\n },\n },\n 'handlers': {\n 'console': {\n 'class': 'logging.StreamHandler',\n 'filters': ['request'],\n 'formatter': 'request_format',\n },\n },\n 'loggers': {\n 'myapp': {\n # Add your handlers that have the unbound request filter\n 'handlers': ['console'],\n # Optionally, add the unbound request filter to your\n # application.\n 'filters': ['request'],\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/tarkatronic/django-requestlogging", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "django-requestlogging-redux", "package_url": "https://pypi.org/project/django-requestlogging-redux/", "platform": "", "project_url": "https://pypi.org/project/django-requestlogging-redux/", "project_urls": { "Homepage": "https://github.com/tarkatronic/django-requestlogging" }, "release_url": "https://pypi.org/project/django-requestlogging-redux/1.2.1/", "requires_dist": null, "requires_python": "", "summary": "Adds information about requests to logging records.", "version": "1.2.1" }, "last_serial": 3096186, "releases": { "1.2.0": [ { "comment_text": "", "digests": { "md5": "924342984014d8957264dd3a919e9448", "sha256": "6214b7bf7f494c36ec869f0945a0c1f8169b8e1b85b62aaca82cdf3ce6cb6200" }, "downloads": -1, "filename": "django_requestlogging_redux-1.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "924342984014d8957264dd3a919e9448", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13150, "upload_time": "2016-10-14T00:33:49", "url": "https://files.pythonhosted.org/packages/f9/f2/e7d76551534bf9cc5d1eb84730c3a16459543623318f3f4248ce132d8c32/django_requestlogging_redux-1.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "927254eda6c2c0bb71fca30c369cde63", "sha256": "c47af2f946fac90a593edd63706743d911a90bf2abd93acf1ec6a29fb1a14487" }, "downloads": -1, "filename": "django-requestlogging-redux-1.2.0.tar.gz", "has_sig": false, "md5_digest": "927254eda6c2c0bb71fca30c369cde63", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6767, "upload_time": "2016-10-14T00:33:50", "url": "https://files.pythonhosted.org/packages/2a/09/e833ae3293701533e2950fd586e2bbef7a8b3fdff95cdf8ec6a71141c034/django-requestlogging-redux-1.2.0.tar.gz" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "42f4a58ad533e6df9cc2521d5c5c9ae9", "sha256": "e672c65a58c647c2142165ce872eaac2fd26ddb997f9eb20b270cd78221c29b3" }, "downloads": -1, "filename": "django-requestlogging-redux-1.2.1.tar.gz", "has_sig": false, "md5_digest": "42f4a58ad533e6df9cc2521d5c5c9ae9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7971, "upload_time": "2017-08-14T18:41:37", "url": "https://files.pythonhosted.org/packages/af/d3/c52922bf8a9abc0e7c848bab899f46cbb982ab7d68d910b6aa8547c6bd07/django-requestlogging-redux-1.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "42f4a58ad533e6df9cc2521d5c5c9ae9", "sha256": "e672c65a58c647c2142165ce872eaac2fd26ddb997f9eb20b270cd78221c29b3" }, "downloads": -1, "filename": "django-requestlogging-redux-1.2.1.tar.gz", "has_sig": false, "md5_digest": "42f4a58ad533e6df9cc2521d5c5c9ae9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7971, "upload_time": "2017-08-14T18:41:37", "url": "https://files.pythonhosted.org/packages/af/d3/c52922bf8a9abc0e7c848bab899f46cbb982ab7d68d910b6aa8547c6bd07/django-requestlogging-redux-1.2.1.tar.gz" } ] }