Sync loggers and handlers from Horizon upstream

In order to prevent too verbose logging, use recommended
patterns from upstream examples
https://github.com/openstack/horizon/blob/2014.1.1/openstack_dashboard/local/local_settings.py.example

Closes-bug: #1330825

Change-Id: Ie93816388d2bb97d6543c3452398ec15e5c8fd31
Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
This commit is contained in:
Bogdan Dobrelya
2014-06-18 15:48:05 +03:00
parent 2b5340c450
commit db04d3385d

View File

@@ -281,13 +281,11 @@ LOGGING = {
'null': {
'level': 'DEBUG',
'class': 'django.utils.log.NullHandler',
'formatter': 'debug'
},
'console': {
# Set the level to "DEBUG" for verbose output logging.
'level': '<%= @log_level %>',
'level': 'INFO',
'class': 'logging.StreamHandler',
'formatter': 'debug'
},
'file': {
'level': '<%= @log_level %>',
@@ -304,20 +302,16 @@ LOGGING = {
},
},
'loggers': {
# The logger name '' indicates the root of all loggers in Django, so
# logs from any application in this project will go here.
'': {
'handlers':<% if @use_syslog -%> ['syslog']<% else -%> ['file']<% end -%>,
'level': 'NOTSET',
'propagate': True
},
# Logging from django.db.backends is VERY verbose, send to null
# by default.
'django.db.backends': {
'handlers':<% if @django_debug and @use_syslog -%> ['syslog']<% else -%> ['null']<% end -%>,
'level': 'DEBUG',
'propagate': False
},
'handlers': ['null'],
'propagate': False,
},
'requests': {
'handlers': ['null'],
'propagate': False,
},
'horizon': {
'handlers':<% if @use_syslog -%> ['syslog']<% else -%> ['file']<% end -%>,
'level': 'DEBUG',
@@ -333,7 +327,12 @@ LOGGING = {
'level': 'DEBUG',
'propagate': False
},
'glanceclient': {
'cinderclient': {
'handlers':<% if @use_syslog -%> ['syslog']<% else -%> ['file']<% end -%>,
'level': 'DEBUG',
'propagate': False,
},
'glanceclient': {
'handlers':<% if @use_syslog -%> ['syslog']<% else -%> ['file']<% end -%>,
'level': 'DEBUG',
'propagate': False
@@ -348,11 +347,45 @@ LOGGING = {
'level': 'DEBUG',
'propagate': False
},
'heatclient': {
'handlers':<% if @use_syslog -%> ['syslog']<% else -%> ['file']<% end -%>,
'level': 'DEBUG',
'propagate': False,
},
'ceilometerclient': {
'handlers':<% if @use_syslog -%> ['syslog']<% else -%> ['file']<% end -%>,
'level': 'DEBUG',
'propagate': False,
},
'troveclient': {
'handlers':<% if @use_syslog -%> ['syslog']<% else -%> ['file']<% end -%>,
'level': 'DEBUG',
'propagate': False,
},
'swiftclient': {
'handlers':<% if @use_syslog -%> ['syslog']<% else -%> ['file']<% end -%>,
'level': 'DEBUG',
'propagate': False,
},
'openstack_auth': {
'handlers':<% if @use_syslog -%> ['syslog']<% else -%> ['file']<% end -%>,
'level': 'DEBUG',
'propagate': False,
},
'nose.plugins.manager': {
'handlers':<% if @use_syslog -%> ['syslog']<% else -%> ['file']<% end -%>,
'level': 'DEBUG',
'propagate': False
}
},
'django': {
'handlers':<% if @django_debug and @use_syslog -%> ['syslog']<% elif @django_debug -%> ['file']<% else -%> ['null']<% end -%>,
'level': 'DEBUG',
'propagate': False
},
'iso8601': {
'handlers': ['null'],
'propagate': False,
},
}
}
LOGIN_URL='<%= scope.lookupvar("horizon::params::root_url") %>/auth/login/'