Merge "add 'log_handler' parameter"
This commit is contained in:
@@ -74,6 +74,9 @@
|
||||
# (optional) Maximum number of Swift containers/objects to display
|
||||
# on a single page. Defaults to 1000.
|
||||
#
|
||||
# [*log_handler*]
|
||||
# (optional) Log handler. Defaults to 'file'
|
||||
#
|
||||
# [*log_level*]
|
||||
# (optional) Log level. Defaults to 'INFO'. WARNING: Setting this to
|
||||
# DEBUG will let plaintext passwords be logged in the Horizon log file.
|
||||
@@ -223,6 +226,7 @@ class horizon(
|
||||
$secondary_endpoint_type = undef,
|
||||
$available_regions = undef,
|
||||
$api_result_limit = 1000,
|
||||
$log_handler = 'file',
|
||||
$log_level = 'INFO',
|
||||
$help_url = 'http://docs.openstack.org',
|
||||
$local_settings_template = 'horizon/local_settings.py.erb',
|
||||
|
||||
@@ -87,6 +87,8 @@ describe 'horizon' do
|
||||
:django_session_engine => 'django.contrib.sessions.backends.cache',
|
||||
:keystone_default_role => 'SwiftOperator',
|
||||
:keystone_url => 'https://keystone.example.com:4682',
|
||||
:log_handler => 'syslog',
|
||||
:log_level => 'DEBUG',
|
||||
:openstack_endpoint_type => 'internalURL',
|
||||
:secondary_endpoint_type => 'ANY-VALUE',
|
||||
:django_debug => true,
|
||||
@@ -124,6 +126,8 @@ describe 'horizon' do
|
||||
'OPENSTACK_ENDPOINT_TYPE = "internalURL"',
|
||||
'SECONDARY_ENDPOINT_TYPE = "ANY-VALUE"',
|
||||
'API_RESULT_LIMIT = 4682',
|
||||
" 'level': 'DEBUG',",
|
||||
" 'handlers': ['syslog'],",
|
||||
'COMPRESS_OFFLINE = False',
|
||||
"FILE_UPLOAD_TEMP_DIR = '/var/spool/horizon'"
|
||||
])
|
||||
|
||||
@@ -325,6 +325,9 @@ LOGGING = {
|
||||
'format': '%(asctime)s %(process)d %(levelname)s %(name)s '
|
||||
'%(message)s'
|
||||
},
|
||||
'normal': {
|
||||
'format': 'dashboard-%(name)s: %(levelname)s %(message)s'
|
||||
},
|
||||
},
|
||||
'handlers': {
|
||||
'null': {
|
||||
@@ -342,6 +345,13 @@ LOGGING = {
|
||||
'filename': '<%= scope.lookupvar("horizon::params::logdir") %>/horizon.log',
|
||||
'formatter': 'verbose',
|
||||
},
|
||||
'syslog': {
|
||||
'level': '<%= @log_level %>',
|
||||
'facility': 'local1',
|
||||
'class': 'logging.handlers.SysLogHandler',
|
||||
'address': '/dev/log',
|
||||
'formatter': 'normal',
|
||||
}
|
||||
},
|
||||
'loggers': {
|
||||
# Logging from django.db.backends is VERY verbose, send to null
|
||||
@@ -356,98 +366,98 @@ LOGGING = {
|
||||
},
|
||||
'horizon': {
|
||||
# 'handlers': ['console'],
|
||||
'handlers': ['file'],
|
||||
'handlers': ['<%= @log_handler %>'],
|
||||
# 'level': 'DEBUG',
|
||||
'level': '<%= @log_level %>',
|
||||
'propagate': False,
|
||||
},
|
||||
'openstack_dashboard': {
|
||||
# 'handlers': ['console'],
|
||||
'handlers': ['file'],
|
||||
'handlers': ['<%= @log_handler %>'],
|
||||
# 'level': 'DEBUG',
|
||||
'level': '<%= @log_level %>',
|
||||
'propagate': False,
|
||||
},
|
||||
'novaclient': {
|
||||
# 'handlers': ['console'],
|
||||
'handlers': ['file'],
|
||||
'handlers': ['<%= @log_handler %>'],
|
||||
# 'level': 'DEBUG',
|
||||
'level': '<%= @log_level %>',
|
||||
'propagate': False,
|
||||
},
|
||||
'cinderclient': {
|
||||
# 'handlers': ['console'],
|
||||
'handlers': ['file'],
|
||||
'handlers': ['<%= @log_handler %>'],
|
||||
# 'level': 'DEBUG',
|
||||
'level': '<%= @log_level %>',
|
||||
'propagate': False,
|
||||
},
|
||||
'keystoneclient': {
|
||||
# 'handlers': ['console'],
|
||||
'handlers': ['file'],
|
||||
'handlers': ['<%= @log_handler %>'],
|
||||
# 'level': 'DEBUG',
|
||||
'level': '<%= @log_level %>',
|
||||
'propagate': False,
|
||||
},
|
||||
'glanceclient': {
|
||||
# 'handlers': ['console'],
|
||||
'handlers': ['file'],
|
||||
'handlers': ['<%= @log_handler %>'],
|
||||
# 'level': 'DEBUG',
|
||||
'level': '<%= @log_level %>',
|
||||
'propagate': False,
|
||||
},
|
||||
'neutronclient': {
|
||||
# 'handlers': ['console'],
|
||||
'handlers': ['file'],
|
||||
'handlers': ['<%= @log_handler %>'],
|
||||
# 'level': 'DEBUG',
|
||||
'level': '<%= @log_level %>',
|
||||
'propagate': False,
|
||||
},
|
||||
'heatclient': {
|
||||
# 'handlers': ['console'],
|
||||
'handlers': ['file'],
|
||||
'handlers': ['<%= @log_handler %>'],
|
||||
# 'level': 'DEBUG',
|
||||
'level': '<%= @log_level %>',
|
||||
'propagate': False,
|
||||
},
|
||||
'ceilometerclient': {
|
||||
# 'handlers': ['console'],
|
||||
'handlers': ['file'],
|
||||
'handlers': ['<%= @log_handler %>'],
|
||||
# 'level': 'DEBUG',
|
||||
'level': '<%= @log_level %>',
|
||||
'propagate': False,
|
||||
},
|
||||
'troveclient': {
|
||||
# 'handlers': ['console'],
|
||||
'handlers': ['file'],
|
||||
'handlers': ['<%= @log_handler %>'],
|
||||
# 'level': 'DEBUG',
|
||||
'level': '<%= @log_level %>',
|
||||
'propagate': False,
|
||||
},
|
||||
'swiftclient': {
|
||||
# 'handlers': ['console'],
|
||||
'handlers': ['file'],
|
||||
'handlers': ['<%= @log_handler %>'],
|
||||
# 'level': 'DEBUG',
|
||||
'level': '<%= @log_level %>',
|
||||
'propagate': False,
|
||||
},
|
||||
'openstack_auth': {
|
||||
# 'handlers': ['console'],
|
||||
'handlers': ['file'],
|
||||
'handlers': ['<%= @log_handler %>'],
|
||||
# 'level': 'DEBUG',
|
||||
'level': '<%= @log_level %>',
|
||||
'propagate': False,
|
||||
},
|
||||
'nose.plugins.manager': {
|
||||
# 'handlers': ['console'],
|
||||
'handlers': ['file'],
|
||||
'handlers': ['<%= @log_handler %>'],
|
||||
# 'level': 'DEBUG',
|
||||
'level': '<%= @log_level %>',
|
||||
'propagate': False,
|
||||
},
|
||||
'django': {
|
||||
# 'handlers': ['console'],
|
||||
'handlers': ['file'],
|
||||
'handlers': ['<%= @log_handler %>'],
|
||||
# 'level': 'DEBUG',
|
||||
'level': '<%= @log_level %>',
|
||||
'propagate': False,
|
||||
|
||||
Reference in New Issue
Block a user