summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2025-01-15 20:38:43 +0100
committerChristian Breunig <christian@breunig.cc>2025-02-03 07:16:07 +0100
commit20ab585a68982c4635c4e5a1ee5bbcc219feaebc (patch)
tree362ae42924447bbd6f3f73493be21fea60be8bb3 /data
parent04d296a3446fa8488add17ce1ec7931d43c4a4d0 (diff)
downloadvyos-1x-20ab585a68982c4635c4e5a1ee5bbcc219feaebc.tar.gz
vyos-1x-20ab585a68982c4635c4e5a1ee5bbcc219feaebc.zip
syslog: T6989: move up "global preserve-fqdn" one level in CLI
Move "global preserve-fqdn" one CLI level up, as it relates to all logging targets (console, global and remote).
Diffstat (limited to 'data')
-rw-r--r--data/templates/rsyslog/rsyslog.conf.j28
1 files changed, 4 insertions, 4 deletions
diff --git a/data/templates/rsyslog/rsyslog.conf.j2 b/data/templates/rsyslog/rsyslog.conf.j2
index 779ae8d04..bc98329b2 100644
--- a/data/templates/rsyslog/rsyslog.conf.j2
+++ b/data/templates/rsyslog/rsyslog.conf.j2
@@ -51,13 +51,13 @@ global(workDirectory="/var/spool/rsyslog")
# Load the immark module for periodic --MARK-- message capability
module(load="immark" interval="{{ global.marker.interval }}")
{% endif %}
-{% if global.preserve_fqdn is vyos_defined %}
+{% if preserve_fqdn is vyos_defined %}
# Preserve the fully qualified domain name (FQDN) in log messages
global(preserveFQDN="on")
-{% endif %}
-{% if global.local_host_name is vyos_defined %}
+{% if preserve_fqdn.host_name is vyos_defined and preserve_fqdn.domain_name is vyos_defined %}
# Set the local hostname for log messages
-global(localHostname="{{ global.local_host_name }}")
+global(localHostname="{{ preserve_fqdn.host_name }}.{{ preserve_fqdn.domain_name }}")
+{% endif %}
{% endif %}
#### GLOBAL LOGGING ####