summaryrefslogtreecommitdiffstats
path: root/doc/property_replacer.html
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-09-10 12:29:44 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-09-10 12:29:44 +0200
commit1d97cb00bdb349e3d7b275607f3d31a61abdf02e (patch)
treeb07197b97a2bf7f512918a9a1589ef0ffbabda20 /doc/property_replacer.html
parentd65470842d1455fd335fcd62e54aed01628a2af6 (diff)
downloadrsyslog-1d97cb00bdb349e3d7b275607f3d31a61abdf02e.tar.gz
rsyslog-1d97cb00bdb349e3d7b275607f3d31a61abdf02e.tar.xz
rsyslog-1d97cb00bdb349e3d7b275607f3d31a61abdf02e.zip
added doc for new property replacer feature
(see previous commit)
Diffstat (limited to 'doc/property_replacer.html')
-rw-r--r--doc/property_replacer.html24
1 files changed, 23 insertions, 1 deletions
diff --git a/doc/property_replacer.html b/doc/property_replacer.html
index 367c8add..ad3ae552 100644
--- a/doc/property_replacer.html
+++ b/doc/property_replacer.html
@@ -250,8 +250,30 @@ same example with semicolon as delimiter is "%msg:F,59:3%".</p>
<p>Please note that the special characters "F" and "R" are
case-sensitive. Only upper case works, lower case will return an error.
There are no white spaces permitted inside the sequence (that will lead
-to error messages and will NOT provide the intended result).<br>
+to error messages and will NOT provide the intended result).</p>
+<p>Each occurence of the field delimiter starts a new field. However,
+if you add a plus sign ("+") after the field delimiter, multiple
+delimiters, one immediately after the others, are treated as separate
+fields. This can be useful in cases where the syslog message contains
+such sequences. A frequent case may be with code that is written as
+follows:</p>
+<code><pre>
+int n, m;
+...
+syslog(LOG_ERR, "%d test %6d", n, m);
+</pre></code>
+<p>This will result into things like this in syslog messages:
+"1 test&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2",
+"1 test&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;23",
+"1 test&nbsp;&nbsp;234567"
+<p>As you can see, the fields are delimited by space characters, but
+their exact number is unknown. They can properly be extracted as follows:
+<p>
+"%msg:F,32:2%" to "%msg:F,32+:2%".
+<p>This feature was suggested by Zhuang Yuyao and implemented by him.
+It is modeled after perl compatible regular expressions.
</p>
+
<h2>Property Options</h2>
<b><code>property options</code></b> are
case-insensitive. Currently, the following options are defined: