Permalink
Browse files

Obsoletion note in README. DeprecationWarning on import.

  • Loading branch information...
1 parent 24b9fe0 commit 22df675e2d4ba0bea028484f90a8d31e67d7a6e1 @isagalaev committed Mar 31, 2011
Showing with 16 additions and 0 deletions.
  1. +9 −0 README
  2. +7 −0 django_errorlog/models.py
View
@@ -1,3 +1,12 @@
+DISCLAIMER!
+
+As of release 1.3 Django uses standard Python logging for everything, including
+request exception. Thus django_errorlog is no longer needed. See Django docs
+for [setting up logging handlers][0].
+
+[0]: http://docs.djangoproject.com/en/1.3/topics/logging/
+
+
## WHAT'S THIS
By default Django sends server errors by email which might be not convenient
@@ -5,11 +5,18 @@
import traceback
import logging
from logging import handlers
+import warnings
+import django
from django.core import signals
from django.utils.encoding import smart_str
from django.conf import settings
+
+major, minor, release, stage, _ = django.VERSION
+if (major, minor, release, stage) >= (1, 3, 0, 'final'):
+ warnings.warn('Django_errorlog is obsolete. Setup logging using standard Django settings', DeprecationWarning)
+
def _get_logger(name, setting_name):
'''
Returns a named logger.

0 comments on commit 22df675

Please sign in to comment.