Fix value of syslog facility
According syslog specification to calculate Priority value
the Facility value should be multiplied by 8.
spec - https://tools.ietf.org/html/rfc5424#section-6.2.1
Change-Id: I9864295da2245faa49a296ffc8595f0bf7bce5cb
Related-PROD: PROD-21310
diff --git a/panko/files/logging.conf b/panko/files/logging.conf
index aceb6f8..5d264af 100644
--- a/panko/files/logging.conf
+++ b/panko/files/logging.conf
@@ -74,7 +74,12 @@
{%- set ossyslog_args = values.logging.log_handlers.ossyslog.get('args', {}) -%}
[handler_ossyslog]
class = oslo_log.handlers.OSSysLogHandler
-args = ( handlers.SysLogHandler.{{ ossyslog_args.get('facility', 'LOG_USER') }}, )
+# the OSSysLogHandler uses 'syslog' lib, where the LOG_* facilities are already *8
+# but in the context where the args are evaluated we have access only to Python's
+# handlers.SysLogHandler.LOG_* constants that _ARE_NOT_ multiplied by 8.
+# To not have a completely magic single int in the rendered template,
+# we multiply it here.
+args = ( 8 * handlers.SysLogHandler.{{ ossyslog_args.get('facility', 'LOG_USER') }}, )
formatter = context
{%- endif %}
@@ -87,4 +92,4 @@
{%- if values.logging.log_handlers.get('fluentd', {}).get('enabled', False) %}
[formatter_fluentd]
class = oslo_log.formatters.FluentFormatter
-{%- endif %}
\ No newline at end of file
+{%- endif %}