mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Update LOGGING example taken from Django docs. (#114903)
For example, Django no longer provides a custom NullHandler
6c66a41c3d
* Remove require_debug_true.
This commit is contained in:
parent
00d7109075
commit
28bb2961ba
1 changed files with 11 additions and 14 deletions
|
@ -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',
|
||||
'level': 'INFO',
|
||||
'class': 'logging.StreamHandler',
|
||||
'formatter': 'simple'
|
||||
'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'],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue