From de9bba0e97e66d1b1254661f85b9a108518eac76 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" (cherry picked from commit c196c6d9207ef112e478f44923b2d0bc8a15b3c9) --- 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 97e0ee0b7..0141812ac 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