summaryrefslogtreecommitdiff
path: root/data/templates/rsyslog/rsyslog.conf.j2
diff options
context:
space:
mode:
authorNicolas Vollmar <nvo@scaling.ch>2024-09-24 18:27:29 +0200
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2024-09-24 16:32:49 +0000
commitea5da8d07d1733207345ec2b736359483f25d7fb (patch)
tree49ecbfbf5144e6c8207ff44e387b304ea7fb4119 /data/templates/rsyslog/rsyslog.conf.j2
parent46f83c7d09b923e99a3632b7cc153da08cdded9a (diff)
downloadvyos-1x-ea5da8d07d1733207345ec2b736359483f25d7fb.tar.gz
vyos-1x-ea5da8d07d1733207345ec2b736359483f25d7fb.zip
syslog: T6719: fix the behavior of "syslog global preserve-fqdn"
(cherry picked from commit c196c6d9207ef112e478f44923b2d0bc8a15b3c9)
Diffstat (limited to 'data/templates/rsyslog/rsyslog.conf.j2')
-rw-r--r--data/templates/rsyslog/rsyslog.conf.j24
1 files changed, 4 insertions, 0 deletions
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 %}