Skip to content
Browse files

docs for errors

  • Loading branch information...
1 parent 38131d7 commit 57abbb516bd4f1e64a3246333aec5c1f19237c27 @andymckay andymckay committed
Showing with 57 additions and 1 deletion.
  1. +53 −0 errors.rst
  2. +1 −0 index.rst
  3. +3 −1 libs.rst
View
53 errors.rst
@@ -0,0 +1,53 @@
+======
+Errors
+======
+
+Mailing errors
+--------------
+
+You can send error tracebacks by email when server errors occur. Configure this
+by setting::
+
+ LOGGING = {
+ 'handlers': {
+ 'mail_admins': {
+ 'level': 'ERROR',
+ 'class': 'django.utils.log.AdminEmailHandler',
+ }
+ },
+ 'loggers': {
+ 'django.request': {
+ 'handlers': ['mail_admins'],
+ 'level': 'ERROR',
+ 'propagate': False,
+ },
+ },
+ }
+
+Arecibo
+-------
+
+Optionally, you can use `Arecibo`_ to record your errors. This can help stop an
+email flood, gives you a URL for a traceback and statistics. To add-in
+Arecibo, add the destination server to your `local_settings.py`.
+
+If are developing a site for Mozilla, you can use an `existing`_ Arecibo
+server, otherwise you'll need to set one up.
+
+For example in `settings_local.py`::
+
+ ARECIBO_SERVER_URL = 'http://amckay-arecibo.khan.mozilla.org'
+
+The easiest way to report exceptions is to use the middleware, again in `settings_local.py`::
+
+ MIDDLEWARE_CLASSES += 'django_arecibo.middleware.AreciboMiddlewareCelery',
+
+Finally, please ensure `settings_test.py` is set to the default::
+
+ ARECIBO_SERVER_URL = ''
+
+Further information on `django_arecibo`_.
+
+.. _django_arecibo: http://www.areciboapp.com/docs/client/django.html
+.. _existing: http://readthedocs.org/docs/mozweb/en/latest/errors.html
+.. _Arecibo: http://areciboapp.com
View
1 index.rst
@@ -47,6 +47,7 @@ Contents
migrations
l10n
logging
+ errors
docs
bestpractices
View
4 libs.rst
@@ -10,7 +10,7 @@ otherwise useful for it. The list is incomplete.
For a full list of enhancements enabled by default, check out the
:ref:`feature list <features>`.
-**Note:** Libraries marked with an \*asterisk\* are bundled with playdoh by default.
+**Note:** Libraries marked with an \*asterisk\* are bundled with playdoh by default.
Python
@@ -39,6 +39,8 @@ Deployment
* `django-waffle <https://github.com/jsocol/django-waffle>`_:
A feature flipper for Django.
+* `django-arecibo <https://github.com/andymckay/django-arecibo>`_ \*:
+ Track the errors on your website in a database.
Internationalization (i18n) and Localization (L10n)
---------------------------------------------------

0 comments on commit 57abbb5

Please sign in to comment.
Something went wrong with that request. Please try again.