Skip to content

Commit 6b0b58c

Browse files
committed
Remove custom logger and forced DEBUG from project settings
1 parent 2c6058f commit 6b0b58c

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

sample_project/settings.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -52,21 +52,6 @@
5252
'django.contrib.messages.middleware.MessageMiddleware',
5353
)
5454

55-
if DEBUG:
56-
import traceback
57-
import logging
58-
59-
# Define a class that logs unhandled errors
60-
class LogUncatchedErrors:
61-
def process_exception(self, request, exception):
62-
logging.error("Unhandled Exception on request for %s\n%s",
63-
request.build_absolute_uri(), traceback.format_exc())
64-
# And add it to the middleware classes
65-
MIDDLEWARE_CLASSES += ('sample_project.settings.LogUncatchedErrors',)
66-
67-
# set shown level of logging output to debug
68-
logging.basicConfig(level=logging.DEBUG)
69-
7055
ROOT_URLCONF = '{0}.urls'.format(TOPDIR)
7156

7257
TEMPLATE_DIRS = (

0 commit comments

Comments
 (0)