{ "info": { "author": "Hugo Rodger-Brown", "author_email": "hugo@rodger-brown.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "Django-Errordite\n================\n\nThis package provides integration between Django and Errordite.\n\nThe application is provided in the form of a standard Python logging handler.\n\nIt is a django-aware subclass of the errordite package logging handler. This\nmeans that in addition to logging core exception information (which the base\n``errordite`` handler will do), this handler is context-aware, and if you pass\na django request object into the logger then relevant information will be\nextracted from the request and added to the data sent to Errordite. Additional\ninformation includes: client ip address, user agent, x-forwarded-for header\n(in case you are behind a load balancer), django user username (if exists).\n\nIn order to append the request to the log record, add it to the ``extra`` arg::\n\n import logging\n logger = logging.getLogger(__name__)\n\n def index_view(request):\n \"\"\"\n Standard django view method.\n \"\"\"\n try:\n do_something()\n except:\n logger.error(\"Something went wrong.\", extra={'request': request})\n\nSee Python docs on logging for more details on the 'extra' keyword arg:\nhttp://docs.python.org/2/library/logging.html#logging.Logger.debug\n\nInstallation\n------------\n\nThe library is available at pypi as 'django-errordite', and can therefore be\ninstalled using pip::\n \n $ pip install django-errordite\n\nDependencies\n------------\n\nThis package is dependent on the ``errordite`` package - which should be\ninstalled automatically.\n\nConfiguration\n-------------\n\nIn order to set up a valid **DjangoErrorditeHandler** you must pass in an\nErrordite API token, which you can get by signing up at http://www.errordite.com\n\nThe logging handler should be configured in the django ``settings.py`` file.\n\nThis is an extract from a basic ``settings.py`` that extracts the token from\nthe local environment, and configures a single logger::\n\n import os\n\n ERRORDITE_TOKEN = os.environ.get('ERRORDITE_TOKEN', None)\n if ERRORDITE_TOKEN is None:\n raise Exception(\"You must set the ERRORDITE_TOKEN environment \"\n \"variable if you wish to run the tests.\")\n\n LOGGING = {\n 'version': 1,\n 'disable_existing_loggers': False,\n 'formatters': {\n 'simple': {\n 'format': '%(levelname)s %(message)s'\n },\n },\n 'handlers': {\n 'django_errordite': {\n 'level': 'DEBUG',\n 'class': 'django_errordite.DjangoErrorditeHandler',\n 'token': ERRORDITE_TOKEN,\n 'formatter': 'simple'\n },\n },\n 'loggers': {\n 'test': {\n 'handlers': ['django_errordite'],\n 'propagate': False,\n 'level': 'DEBUG',\n },\n }\n }\n\n\nTests\n-----\n\nThere are tests in the package - they can be run using the django test runner::\n\n $ cd to/django-errordite/package/directory\n $ python manage.py test test_app\n\nThe ``test_app`` is an empty django application that is in the package redist\nthat is used to force the django test runner to load only the package tests (\ni.e. without running the entire django test suite.)\n\nNB These tests do log real exceptions over the wire, so you will need to be\nconnected to the web to run them. You will also need to set a local environment\nvariable (**ERRORDITE_TOKEN**), which is picked up in the test suite.\n\nIf you are \\*nix you can pass this in on the command line::\n\n $ ERRORDITE_TOKEN=123 python manage.py test test_app\n\nIf you are on Windows you'll need to set it up explicitly as an env var::\n\n c:\\> set ERRORDITE_TOKEN=123\n c:\\> python manage.py test test_app\n\n(This is a technique used to prevent having to have sensitive information in\nthe public repo.)", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/hugorodgerbrown/django-errordite", "keywords": null, "license": "Copyright (c) 2013, Hugo Rodger-Brown\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met: \n\n1. Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer. \n2. Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation\n and/or other materials provided with the distribution. \n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.", "maintainer": null, "maintainer_email": null, "name": "django-errordite", "package_url": "https://pypi.org/project/django-errordite/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-errordite/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/hugorodgerbrown/django-errordite" }, "release_url": "https://pypi.org/project/django-errordite/0.8/", "requires_dist": null, "requires_python": null, "summary": "Errordite exception logging for Django.", "version": "0.8" }, "last_serial": 725057, "releases": { "0.5": [ { "comment_text": "", "digests": { "md5": "8b9a10ca1f9f20e0be99a2ee36d1dc31", "sha256": "f8139cad28d9fa141ed8b393883d0c7f0fb2bb91efbc7546bfa4bc9a2ed7889e" }, "downloads": -1, "filename": "django-errordite-0.5.zip", "has_sig": false, "md5_digest": "8b9a10ca1f9f20e0be99a2ee36d1dc31", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11508, "upload_time": "2013-03-03T10:23:41", "url": "https://files.pythonhosted.org/packages/df/23/b6067558c3448d246a6e0f97ef3cbfaa7822ec7299c7b8c6da0dd58c5355/django-errordite-0.5.zip" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "6fa22d7b40f2898348267e2692c4c447", "sha256": "83611c7dd0b74a68848dd9fc63e9798f94eabe4f30cea73bc947eeaaec3a9a55" }, "downloads": -1, "filename": "django-errordite-0.6.zip", "has_sig": false, "md5_digest": "6fa22d7b40f2898348267e2692c4c447", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11575, "upload_time": "2013-03-03T11:07:02", "url": "https://files.pythonhosted.org/packages/c7/90/655a8c282efc59bda7fd5c120c97aa3db4eefc0d920e181aaaef5673025e/django-errordite-0.6.zip" } ], "0.7": [ { "comment_text": "", "digests": { "md5": "0d22dee2b559851276a001021c07189c", "sha256": "c91ea16ff7c7373d1b622ce122f1f3f7d8a0b275012edfb8d411e4f3bf007d63" }, "downloads": -1, "filename": "django-errordite-0.7.tar.gz", "has_sig": false, "md5_digest": "0d22dee2b559851276a001021c07189c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4976, "upload_time": "2013-04-30T11:23:22", "url": "https://files.pythonhosted.org/packages/d8/98/467d2da8103485b31ba0a204cf75f3cac7236a504ce86f52c4869c72b7f2/django-errordite-0.7.tar.gz" } ], "0.8": [ { "comment_text": "", "digests": { "md5": "b6589aa47ebc63e2edd07a2c7471e904", "sha256": "34252045df5ed2c449ba160a134382c483fbe03fc67f23f8c042c73e1ae0b7bd" }, "downloads": -1, "filename": "django-errordite-0.8.tar.gz", "has_sig": false, "md5_digest": "b6589aa47ebc63e2edd07a2c7471e904", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5033, "upload_time": "2013-05-13T13:22:20", "url": "https://files.pythonhosted.org/packages/b1/44/8b2bf1b279cd12b9f7e5ba14b33624bed5982e8720c38ff7b176c1a07d57/django-errordite-0.8.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b6589aa47ebc63e2edd07a2c7471e904", "sha256": "34252045df5ed2c449ba160a134382c483fbe03fc67f23f8c042c73e1ae0b7bd" }, "downloads": -1, "filename": "django-errordite-0.8.tar.gz", "has_sig": false, "md5_digest": "b6589aa47ebc63e2edd07a2c7471e904", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5033, "upload_time": "2013-05-13T13:22:20", "url": "https://files.pythonhosted.org/packages/b1/44/8b2bf1b279cd12b9f7e5ba14b33624bed5982e8720c38ff7b176c1a07d57/django-errordite-0.8.tar.gz" } ] }