Logovaci masinerie explicitne

This commit is contained in:
Tomas "Jethro" Pokorny 2019-05-17 21:18:10 +02:00
parent 14bd827df0
commit 31fe029a98

View file

@ -47,7 +47,43 @@ DATABASES = {
#} #}
# LOGGING # LOGGING
LOGGING = {
'version': 1,
'disable_existing_loggers': True,
'filters': {
'require_debug_false': {
'()': 'django.utils.log.RequireDebugFalse'
}
},
'formatters': {
'simple': {
'format': '%(asctime)s - %(name)s - %(levelname)-8s - %(message)s',
},
},
'handlers': {
'dummy': {
'class': 'logging.NullHandler',
},
'console': {
'level': 'DEBUG',
'class': 'logging.StreamHandler',
'formatter': 'simple',
},
},
'loggers': {
# Vypisovani databazovych dotazu do konzole
'django.db.backends': {
'level': 'DEBUG',
'handlers': ['console'],
'propagate': False,
},
'': {
'handlers': ['console'],
'level': 'DEBUG',
'propagate': False,
},
},
}
# set to 'DEBUG' for EXTRA verbose output # set to 'DEBUG' for EXTRA verbose output
LOGGING['handlers']['console']['level'] = 'INFO' # LOGGING['handlers']['console']['level'] = 'INFO'