summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-08-01 10:12:40 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-08-01 10:12:40 +0000
commit2bc228c6ed952a5f9510fa974e47e27871e87046 (patch)
tree46f338255e325cd3a9b92ff7358ac8b051fe7c85 /doc
parent723733291562ea73399d2947067ca74d12152a1b (diff)
downloadrsyslog-2bc228c6ed952a5f9510fa974e47e27871e87046.tar.gz
rsyslog-2bc228c6ed952a5f9510fa974e47e27871e87046.tar.xz
rsyslog-2bc228c6ed952a5f9510fa974e47e27871e87046.zip
enhanced/renamed $include(config) directive
Diffstat (limited to 'doc')
-rw-r--r--doc/rsyslog_conf.html51
1 files changed, 40 insertions, 11 deletions
diff --git a/doc/rsyslog_conf.html b/doc/rsyslog_conf.html
index 7fff442e..757aed59 100644
--- a/doc/rsyslog_conf.html
+++ b/doc/rsyslog_conf.html
@@ -130,18 +130,47 @@ setting does not affect the owner of directories already existing. The parameter
is a user name, for which the userid is obtained by rsyslogd on startup and on
HUPing. Interim changes to the user mapping are not detected.</p>
<p><code><b>$DirOwner loguser</b></code></p>
-<h2>Include</h2>
+<h2>IncludeConfig</h2>
<p>This directive allows to include other files into the main configuration
-file. As soon as an include directive is found, the contents of the new file is
-processed. Includes can be nested. Please note that from a logical point of view
-the files are merged. Thus, if the include modifies some parameters (e.g.
-$DynaFileChacheSize), these new parameters are in place for the &quot;calling&quot;
-configuration file when the include is completed. To avoid any side effects, do
-a $ResetConfigVariables after the $Include. It may also be a good idea to do a
-$ResetConfigVariables right at the start of the include, so that the module
-knows exactly what it does. Of course, one might specifically NOT do this to
-inherit parameters from the main file. As always, use it as it best fits...</p>
-<p><code><b>$Include /etc/some-included-file.conf</b></code></p>
+file. As soon as an IncludeConfig directive is found, the contents of the new
+file is processed. IncludeConfigs can be nested. Please note that from a logical
+point of view the files are merged. Thus, if the include modifies some
+parameters (e.g. $DynaFileChacheSize), these new parameters are in place for the
+&quot;calling&quot; configuration file when the include is completed. To avoid any side
+effects, do a $ResetConfigVariables after the $IncludeConfig. It may also be a
+good idea to do a $ResetConfigVariables right at the start of the include, so
+that the module knows exactly what it does. Of course, one might specifically
+NOT do this to inherit parameters from the main file. As always, use it as it
+best fits...</p>
+<p><code><b>$IncludeConfig /etc/some-included-file.conf</b></code></p>
+<p>Directories can also be included. To do so, the name must end on a slash:</p>
+<p><code><b>$IncludeConfig /etc/rsyslog.d/</b></code></p>
+<p>In this case, all regular files in the /etc/rsyslog.d directory are included.
+Files starting with &quot;.&quot; are ignored - so you can use them to place comments into
+the dir (e.g. &quot;/etc/rsyslog.d/.mycomment&quot; will be ignored).
+<a href="http://sourceforge.net/tracker/index.php?func=detail&aid=1764088&group_id=123448&atid=696555">
+Michael Biebl had the idea to this functionality</a>. Let me quote hím: </p>
+<blockquote>
+<p><i>Say you can add an option<br>
+$IncludeConfig /etc/rsyslog.d/<br>
+(which probably would make a good default)<br>
+to /etc/rsyslog.conf, which would then merge and include all *.conf files<br>
+in /etc/rsyslog.d/.<br>
+<br>
+This way, a distribution can modify its packages easily to drop a simple<br>
+config file into this directory upon installation.<br>
+<br>
+As an example, the network-manager package could install a simple config<br>
+file /etc/rsyslog.d/network-manager.conf which would contain.<br>
+:programname, contains, &quot;NetworkManager&quot; -/var/log/NetworkManager.log<br>
+<br>
+Upon uninstallation, the file could be easily removed again. This approach<br>
+would be much cleaner and less error prone, than having to munge around<br>
+with the /etc/rsyslog.conf file directly.</i></p>
+</blockquote>
+<p>Please note that in this description, only &quot;*.conf&quot; files would be read. The
+actual implementation, however, reads all files except for those starting with a
+dot. If you find this is a real big problem, please complain.</p>
<h2>RepeatedMsgReduction</h2>
<p>This directive specifies whether or not repeated messages should be reduced
(this is the &quot;Last line repeated n times&quot; feature). If set to on, repeated messages are reduced. If set to off, every