diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-11-03 09:20:02 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-11-03 09:20:02 +0100 |
commit | e4ca8a3119ece504819605b340a3f5ba36b3eab6 (patch) | |
tree | 9fa4c2baacedb410460fdef268c00fc8e52a9e54 /doc/rainerscript.html | |
parent | 38e83becf605f128ebae26fd58c68c2ef38e946a (diff) | |
download | rsyslog-e4ca8a3119ece504819605b340a3f5ba36b3eab6.tar.gz rsyslog-e4ca8a3119ece504819605b340a3f5ba36b3eab6.tar.xz rsyslog-e4ca8a3119ece504819605b340a3f5ba36b3eab6.zip |
added function getenv() to RainerScript
Diffstat (limited to 'doc/rainerscript.html')
-rw-r--r-- | doc/rainerscript.html | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/doc/rainerscript.html b/doc/rainerscript.html index ef0e41cb..63a79040 100644 --- a/doc/rainerscript.html +++ b/doc/rainerscript.html @@ -51,13 +51,25 @@ of a and b should be tested as "a <> b". The "not" operator should be reserved to cases where it actually is needed to form a complex boolean expression. In those cases, parenthesis are highly recommended. +<h2>Functions</h2> +<p>RainerScript supports a currently quite limited set of functions: +<ul> +<li>getenv(str) - like the OS call, returns the value of the environment +variable, if it exists. Returns an empty string if it does not exist. +<li>strlen(str) - returns the length of the provided string +<li>tolower(str) - converts the provided string into lowercase +</ul> +<p>The following example can be used to build a dynamic filter based on some environment +variable: +<pre> +if $msg contains getenv('TRIGGERVAR') then /path/to/errfile +</pre> <p>[<a href="rsyslog_conf.html">rsyslog.conf overview</a>] [<a href="manual.html">manual index</a>] [<a href="http://www.rsyslog.com/">rsyslog site</a>]</p> <p><font size="2">This documentation is part of the <a href="http://www.rsyslog.com/">rsyslog</a> project.<br> -Copyright © 2008 by <a href="http://www.gerhards.net/rainer">Rainer -Gerhards</a> and +Copyright © 2008, 2009 by <a href="http://www.gerhards.net/rainer">Rainer Gerhards</a> and <a href="http://www.adiscon.com/">Adiscon</a>. Released under the GNU GPL version 3 or higher.</font></p> -</body></html>
\ No newline at end of file +</body></html> |