summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrabhu Ramachandran2011-11-24 19:26:27 +0530
committerPrabhu Ramachandran2011-11-24 19:26:27 +0530
commit92cdea62ed993acd8a6c3c2798c6b89143c3cfb5 (patch)
tree01ae0d410904d0855c92efa0ec55fd93b8111864
parent2fd98c77cb06d078ad82f60abfe769cd7666e229 (diff)
downloadonline_test-92cdea62ed993acd8a6c3c2798c6b89143c3cfb5.tar.gz
online_test-92cdea62ed993acd8a6c3c2798c6b89143c3cfb5.tar.bz2
online_test-92cdea62ed993acd8a6c3c2798c6b89143c3cfb5.zip
Configuring logging to be a tad more useful.
-rw-r--r--settings.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/settings.py b/settings.py
index c007867..a844324 100644
--- a/settings.py
+++ b/settings.py
@@ -155,7 +155,20 @@ INSTALLED_APPS = (
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
+ 'formatters': {
+ 'verbose': {
+ 'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s'
+ },
+ 'simple': {
+ 'format': '%(levelname)s %(message)s'
+ },
+ },
'handlers': {
+ 'console':{
+ 'level':'DEBUG',
+ 'class':'logging.StreamHandler',
+ 'formatter': 'simple'
+ },
'mail_admins': {
'level': 'ERROR',
'class': 'django.utils.log.AdminEmailHandler'
@@ -163,7 +176,7 @@ LOGGING = {
},
'loggers': {
'django.request': {
- 'handlers': ['mail_admins'],
+ 'handlers': ['mail_admins', 'console'],
'level': 'ERROR',
'propagate': True,
},