Package: syslog-ng
Version: 3.1.3-1
Severity: wishlist
Tags: patch

rsyslog has this convenient $IncludeConfig option, which is configured this way
by default on debian:

$IncludeConfig /etc/rsyslog.d/*.conf

This allows the admin to place rsyslog configuration snipplets into
/etc/rsyslog.d/ without needing to modify the configuration file shipped in the
debian package, or without having to sed/awk/parse it if configuring the system
using an automated process.

As it's possible to do the same thing with syslog-ng 3.x, using the "include"
directive, I would find nice to have the same sort of facility in syslog-ng as
in rsyslog. Thanks !

I've attached a patch which does this and works for me.

Cheers,
Marc

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (700, 'testing'), (500, 'testing-proposed-updates'), (500, 
'stable'), (300, 'unstable'), (100, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-trunk-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages syslog-ng depends on:
ii  libc6                         2.11.2-7   Embedded GNU C Library: Shared lib
ii  libdbi0                       0.8.2-3    Database Independent Abstraction L
pn  libevtlog0                    <none>     (no description available)
ii  libglib2.0-0                  2.24.2-1   The GLib library of C routines
ii  libpcre3                      8.02-1.1   Perl 5 Compatible Regular Expressi
ii  lsb-base                      3.2-23.1   Linux Standard Base 3.2 init scrip

Versions of packages syslog-ng recommends:
ii  logrotate                     3.7.8-6    Log rotation utility

syslog-ng suggests no packages.
diff -ruN orig/debian/rules syslog-ng-3.1.3/debian/rules
--- orig/debian/rules	2010-11-14 12:46:15.000000000 +0100
+++ syslog-ng-3.1.3/debian/rules	2011-01-05 18:24:46.000000000 +0100
@@ -93,6 +93,7 @@
 	dh_installlogrotate
 	dh_installlogcheck
 	dh_installchangelogs ChangeLog
+	dh_installdirs
 	dh_strip
 	dh_compress
 	dh_fixperms
diff -ruN orig/debian/syslog-ng.conf syslog-ng-3.1.3/debian/syslog-ng.conf
--- orig/debian/syslog-ng.conf	2010-11-14 12:43:26.000000000 +0100
+++ syslog-ng-3.1.3/debian/syslog-ng.conf	2011-01-05 18:30:24.000000000 +0100
@@ -153,3 +153,11 @@
 # All messages send to a remote site
 #
 #log { source(s_src); destination(d_net); };
+
+########################
+# Include
+########################
+# Include configuration snippets placed in this directory.
+
+include "/etc/syslog-ng/conf.d";
+
diff -ruN orig/debian/syslog-ng.dirs syslog-ng-3.1.3/debian/syslog-ng.dirs
--- orig/debian/syslog-ng.dirs	1970-01-01 01:00:00.000000000 +0100
+++ syslog-ng-3.1.3/debian/syslog-ng.dirs	2011-01-05 18:26:00.000000000 +0100
@@ -0,0 +1 @@
+/etc/syslog-ng/conf.d

Reply via email to