summaryrefslogtreecommitdiff
path: root/data/templates/rsyslog/rsyslog.conf.j2
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2024-09-30 16:22:32 +0100
committerGitHub <noreply@github.com>2024-09-30 16:22:32 +0100
commitb191ea3bc68e37289c42a4bd5c2ef323514bf5ae (patch)
treed141854c6d004cf86caf85c5a740f8d026281b22 /data/templates/rsyslog/rsyslog.conf.j2
parente961fcbca3dffd9de36b342aad57341999e44a11 (diff)
parent9a7d920ab7a9542fc3f3a4cddf50e6413a3c0198 (diff)
downloadvyos-1x-b191ea3bc68e37289c42a4bd5c2ef323514bf5ae.tar.gz
vyos-1x-b191ea3bc68e37289c42a4bd5c2ef323514bf5ae.zip
Merge pull request #4115 from vyos/mergify/bp/circinus/pr-4061
syslog: T5367: add format option to include timezone in message (backport #4061)
Diffstat (limited to 'data/templates/rsyslog/rsyslog.conf.j2')
-rw-r--r--data/templates/rsyslog/rsyslog.conf.j26
1 files changed, 2 insertions, 4 deletions
diff --git a/data/templates/rsyslog/rsyslog.conf.j2 b/data/templates/rsyslog/rsyslog.conf.j2
index 0141812ac..7fd592d1f 100644
--- a/data/templates/rsyslog/rsyslog.conf.j2
+++ b/data/templates/rsyslog/rsyslog.conf.j2
@@ -58,12 +58,10 @@ $outchannel {{ file_name }},/var/log/user/{{ file_name }},{{ file_options.archiv
{% endif %}
{% if host_options.protocol is vyos_defined('tcp') %}
{% if host_options.format.octet_counted is vyos_defined %}
-{{ tmp | join(';') }} @@(o){{ host_name | bracketize_ipv6 }}:{{ host_options.port }};RSYSLOG_SyslogProtocol23Format
-{% else %}
-{{ tmp | join(';') }} @@{{ host_name | bracketize_ipv6 }}:{{ host_options.port }}
+{{ tmp | join(';') }} @@{{ '(o)' if host_options.format.octet_counted is vyos_defined }}{{ host_name | bracketize_ipv6 }}:{{ host_options.port }}{{ ';RSYSLOG_SyslogProtocol23Format' if host_options.format.include_timezone is vyos_defined }}
{% endif %}
{% else %}
-{{ tmp | join(';') }} @{{ host_name | bracketize_ipv6 }}:{{ host_options.port }}{{ ';RSYSLOG_SyslogProtocol23Format' if host_options.format.octet_counted is vyos_defined }}
+{{ tmp | join(';') }} @{{ host_name | bracketize_ipv6 }}:{{ host_options.port }}{{ ';RSYSLOG_SyslogProtocol23Format' if host_options.format.include_timezone is vyos_defined }}
{% endif %}
{% endfor %}
{% endif %}