Allow using a different syslog facility for syslog log handler

Change-Id: I4ca96f7ba11401a99bf5827f17066a4f934f1e83
This commit is contained in:
Takashi Kajinami 2021-11-10 22:03:42 +09:00
parent 71bfbc196c
commit c13e8df1b7
3 changed files with 10 additions and 1 deletions

View File

@ -133,6 +133,10 @@
# (optional) Log level. Defaults to 'INFO'. WARNING: Setting this to
# DEBUG will let plaintext passwords be logged in the Horizon log file.
#
# [*syslog_facility*]
# (optional) Syslog facility used when syslog log hander is enabled.
# Defaults to 'local1'.
#
# [*local_settings_template*]
# (optional) Location of template to use for local_settings.py generation.
# Defaults to 'horizon/local_settings.py.erb'.
@ -558,6 +562,7 @@ class horizon(
$dropdown_max_items = 30,
$log_handlers = ['file'],
$log_level = 'INFO',
$syslog_facility = 'local1',
$help_url = 'http://docs.openstack.org',
$local_settings_template = 'horizon/local_settings.py.erb',
$configure_apache = true,

View File

@ -0,0 +1,4 @@
---
features:
- |
The new ``horizon::syslog_facility`` parameter has been added.

View File

@ -755,7 +755,7 @@ LOGGING = {
<%- if @log_handlers.include?('syslog') -%>
'syslog': {
'level': '<%= @log_level %>',
'facility': 'local1',
'facility': '<%= @syslog_facility %>',
'class': 'logging.handlers.SysLogHandler',
'address': '/dev/log',
'formatter': 'normal',