From c196c6d9207ef112e478f44923b2d0bc8a15b3c9 Mon Sep 17 00:00:00 2001 From: Nicolas Vollmar Date: Tue, 24 Sep 2024 18:27:29 +0200 Subject: syslog: T6719: fix the behavior of "syslog global preserve-fqdn" --- data/templates/rsyslog/rsyslog.conf.j2 | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'data') diff --git a/data/templates/rsyslog/rsyslog.conf.j2 b/data/templates/rsyslog/rsyslog.conf.j2 index effc2ea14..7fd592d1f 100644 --- a/data/templates/rsyslog/rsyslog.conf.j2 +++ b/data/templates/rsyslog/rsyslog.conf.j2 @@ -10,6 +10,10 @@ $MarkMessagePeriod {{ global.marker.interval }} $PreserveFQDN on {% endif %} +{% if global.local_host_name is vyos_defined %} +$LocalHostName {{ global.local_host_name }} +{% endif %} + # We always log to /var/log/messages $outchannel global,/var/log/messages,262144,/usr/sbin/logrotate {{ logrotate }} {% if global.facility is vyos_defined %} -- cgit v1.2.3