From a887b89923ce1844ab3f85930949bc45e61c445e Mon Sep 17 00:00:00 2001 From: Tollef Fog Heen Date: Thu, 27 Nov 2014 16:42:10 +0100 Subject: [PATCH] Use syslog-ng's system() automagic instead of hard coding syslog-ng has a plugin that DTRT on various platforms. Use that instead of hard coding where to grab messages from. As a nice bonus, this works correctly with systemd. --- modules/syslog-ng/templates/syslog-ng.conf.erb | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/modules/syslog-ng/templates/syslog-ng.conf.erb b/modules/syslog-ng/templates/syslog-ng.conf.erb index 7f78680b7..f5d5036b2 100644 --- a/modules/syslog-ng/templates/syslog-ng.conf.erb +++ b/modules/syslog-ng/templates/syslog-ng.conf.erb @@ -5,6 +5,8 @@ <%- else -%> @version: 3.3 <%- end -%> +@include "scl.conf" + ## ## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE. ## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git @@ -104,19 +106,7 @@ options { source s_local { # message generated by Syslog-NG internal(); -<%- if kernel == 'Linux' -%> - # standard Linux log source (this is the default place for the syslog() - # function to send logs to) - unix-stream("/dev/log"); - # messages from the kernel - file("/proc/kmsg" program_override("kernel: ")); -<%- else -%> - # standard Linux log source (this is the default place for the syslog() - # function to send logs to) - unix-dgram("/var/run/log"); - # messages from the kernel - file("/dev/klog" program_override("kernel: ") follow-freq(1)); -<%- end -%> + system(); }; <%- if (hostname == "lotti") || (hostname == "lully") || (hostname == "loghost-grnet-01") -%> -- 2.20.1