Fix log handlers to work for both syslog and rsyslog
Update the [handler_production] and [logger_root] parameters in logging.conf in order to ensure the logs are written to the syslogd daemon. Update to use the /dev/log socket from the syslogd daemon so that the logging works for both rsyslog and syslog. Change-Id: I841f856637b9ca90b446025be6ddaadff7ae06cd Closes-Bug: #1554871 Signed-off-by: Leonardo Borda <leonardo.borda@canonical.com>
This commit is contained in:
parent
cee6aceb0f
commit
6ac015b6d3
@ -1,4 +1,5 @@
|
||||
# icehouse
|
||||
|
||||
[loggers]
|
||||
keys=root
|
||||
|
||||
@ -14,7 +15,7 @@ level={{ root_level }}
|
||||
{% else -%}
|
||||
level=WARNING
|
||||
{% endif -%}
|
||||
handlers=file
|
||||
handlers=file,production
|
||||
|
||||
[handler_production]
|
||||
class=handlers.SysLogHandler
|
||||
@ -24,7 +25,7 @@ level={{ log_level }}
|
||||
level=ERROR
|
||||
{% endif -%}
|
||||
formatter=normal_with_name
|
||||
args=(('localhost', handlers.SYSLOG_UDP_PORT), handlers.SysLogHandler.LOG_USER)
|
||||
args=(('/dev/log'), handlers.SysLogHandler.LOG_USER)
|
||||
|
||||
[handler_file]
|
||||
class=FileHandler
|
||||
|
@ -14,7 +14,7 @@ level={{ root_level }}
|
||||
{% else -%}
|
||||
level=WARNING
|
||||
{% endif -%}
|
||||
handlers=file
|
||||
handlers=file,production
|
||||
|
||||
[handler_production]
|
||||
class=handlers.SysLogHandler
|
||||
@ -24,7 +24,7 @@ level={{ log_level }}
|
||||
level=ERROR
|
||||
{% endif -%}
|
||||
formatter=normal_with_name
|
||||
args=(('localhost', handlers.SYSLOG_UDP_PORT), handlers.SysLogHandler.LOG_USER)
|
||||
args=(('/dev/log'), handlers.SysLogHandler.LOG_USER)
|
||||
|
||||
[handler_file]
|
||||
class=FileHandler
|
||||
|
@ -587,7 +587,7 @@ class KeystoneBasicDeployment(OpenStackAmuletDeployment):
|
||||
expected = {
|
||||
'logger_root': {
|
||||
'level': 'WARNING',
|
||||
'handlers': 'file',
|
||||
'handlers': 'file,production',
|
||||
},
|
||||
'handlers': {
|
||||
'keys': 'production,file,devel'
|
||||
|
Loading…
Reference in New Issue
Block a user