summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Doc/howto/logging-cookbook.rst25
1 files changed, 11 insertions, 14 deletions
diff --git a/Doc/howto/logging-cookbook.rst b/Doc/howto/logging-cookbook.rst
index 9eb1f97..17a83c0 100644
--- a/Doc/howto/logging-cookbook.rst
+++ b/Doc/howto/logging-cookbook.rst
@@ -1933,30 +1933,28 @@ This dictionary is passed to :func:`~config.dictConfig` to put the configuration
LOGGING = {
'version': 1,
- 'disable_existing_loggers': True,
+ 'disable_existing_loggers': False,
'formatters': {
'verbose': {
- 'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s'
+ 'format': '{levelname} {asctime} {module} {process:d} {thread:d} {message}',
+ 'style': '{',
},
'simple': {
- 'format': '%(levelname)s %(message)s'
+ 'format': '{levelname} {message}',
+ 'style': '{',
},
},
'filters': {
'special': {
'()': 'project.logging.SpecialFilter',
'foo': 'bar',
- }
+ },
},
'handlers': {
- 'null': {
- 'level':'DEBUG',
- 'class':'django.utils.log.NullHandler',
- },
- 'console':{
- 'level':'DEBUG',
- 'class':'logging.StreamHandler',
- 'formatter': 'simple'
+ 'console': {
+ 'level': 'INFO',
+ 'class': 'logging.StreamHandler',
+ 'formatter': 'simple',
},
'mail_admins': {
'level': 'ERROR',
@@ -1966,9 +1964,8 @@ This dictionary is passed to :func:`~config.dictConfig` to put the configuration
},
'loggers': {
'django': {
- 'handlers':['null'],
+ 'handlers': ['console'],
'propagate': True,
- 'level':'INFO',
},
'django.request': {
'handlers': ['mail_admins'],