{ "info": { "author": "TrustCentric", "author_email": "admin@trustcentric.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": "django-requestlogging\n=====================\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": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://bitbucket.org/trustcentric/django-requestlogging/", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "django-requestlogging", "package_url": "https://pypi.org/project/django-requestlogging/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-requestlogging/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://bitbucket.org/trustcentric/django-requestlogging/" }, "release_url": "https://pypi.org/project/django-requestlogging/1.0.1/", "requires_dist": null, "requires_python": null, "summary": "Adds information about requests to logging records.", "version": "1.0.1" }, "last_serial": 985742, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "e5b6097e63135d0a8b681f8ee9a19695", "sha256": "fd7d86670e68708bbf05a2250f99d8671d84bfcb785ef9f2ddc33463a945cc7b" }, "downloads": -1, "filename": "django-requestlogging-1.0.tar.gz", "has_sig": false, "md5_digest": "e5b6097e63135d0a8b681f8ee9a19695", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6424, "upload_time": "2011-07-15T22:47:28", "url": "https://files.pythonhosted.org/packages/21/21/01a5029e524a0f4aab9f773105737a60a78254f4fd412dec31d270752f56/django-requestlogging-1.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "d7751d584f4cf120777dd07c69602193", "sha256": "c97af5a4097a4810b73ed05b26e6667414233151c950a9cd6528adadc84044dc" }, "downloads": -1, "filename": "django-requestlogging-1.0.1.tar.gz", "has_sig": false, "md5_digest": "d7751d584f4cf120777dd07c69602193", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7239, "upload_time": "2014-01-30T03:09:02", "url": "https://files.pythonhosted.org/packages/48/1b/38da05706cba8a0b2b5fdbe97367df519bc4f01f015ed777b56adcaedbe9/django-requestlogging-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d7751d584f4cf120777dd07c69602193", "sha256": "c97af5a4097a4810b73ed05b26e6667414233151c950a9cd6528adadc84044dc" }, "downloads": -1, "filename": "django-requestlogging-1.0.1.tar.gz", "has_sig": false, "md5_digest": "d7751d584f4cf120777dd07c69602193", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7239, "upload_time": "2014-01-30T03:09:02", "url": "https://files.pythonhosted.org/packages/48/1b/38da05706cba8a0b2b5fdbe97367df519bc4f01f015ed777b56adcaedbe9/django-requestlogging-1.0.1.tar.gz" } ] }