diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2010-03-17 16:25:24 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2010-03-17 16:25:24 +0100 |
commit | ba0f23182a55b26b2265d2138c707cbc7ddbb72e (patch) | |
tree | b11487a65eade6e5bfcbf15de4f979a0197db55b | |
parent | d7faed130cb089343ea3d9875561582e6f1d469f (diff) | |
download | rsyslog-ba0f23182a55b26b2265d2138c707cbc7ddbb72e.tar.gz rsyslog-ba0f23182a55b26b2265d2138c707cbc7ddbb72e.tar.xz rsyslog-ba0f23182a55b26b2265d2138c707cbc7ddbb72e.zip |
new feature: "." action type added to support writing files to relative pathes
(this is primarily meant as a debug aid)
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | doc/rsyslog_conf_actions.html | 11 | ||||
-rw-r--r-- | tools/omfile.c | 3 |
3 files changed, 13 insertions, 3 deletions
@@ -1,5 +1,7 @@ --------------------------------------------------------------------------- Version 4.6.2 [v4-stable] (rgerhards), 2010-03-?? +- new feature: "." action type added to support writing files to relative + pathes (this is primarily meant as a debug aid) - added new property replacer option "date-rfc3164-buggyday" primarily to ease migration from syslog-ng. See property replacer doc for details. [backport from 5.5.3 because urgently needed by some] diff --git a/doc/rsyslog_conf_actions.html b/doc/rsyslog_conf_actions.html index 8c4b9cfc..6020dd88 100644 --- a/doc/rsyslog_conf_actions.html +++ b/doc/rsyslog_conf_actions.html @@ -37,8 +37,15 @@ compared to the otherwise-equal config directives below:</p> *.=crit /var/log/critmsgs</b></code></p> <p> </p> <h3>Regular File</h3> -<p>Typically messages are logged to real files. The file has to -be specified with full pathname, beginning with a slash "/''.<br> +<p>Typically messages are logged to real files. The file usually is +specified by full pathname, beginning with a slash "/". +Starting with version 4.6.2 and 5.4.1 (previous v5 version do NOT support this) +relative file names can also be specified. To do so, these must begin with a +dot. For example, use "./file-in-current-dir.log" to specify a file in the +current directory. Please note that rsyslogd usually changes its working +directory to the root, so relative file names must be tested with care (they +were introduced primarily as a debugging vehicle, but may have useful other applications +as well).<br> <br> <br> You may prefix each entry with the minus "-'' sign to omit syncing the diff --git a/tools/omfile.c b/tools/omfile.c index daefa680..438f8c4a 100644 --- a/tools/omfile.c +++ b/tools/omfile.c @@ -633,7 +633,7 @@ ENDdoAction BEGINparseSelectorAct CODESTARTparseSelectorAct - if(!(*p == '$' || *p == '?' || *p == '/' || *p == '-')) + if(!(*p == '$' || *p == '?' || *p == '/' || *p == '.' || *p == '-')) ABORT_FINALIZE(RS_RET_CONFLINE_UNPROCESSED); CHKiRet(createInstance(&pData)); @@ -683,6 +683,7 @@ CODESTARTparseSelectorAct * need high-performance pipes at a later stage (unlikely). -- rgerhards, 2010-02-28 */ case '/': + case '.': CODE_STD_STRING_REQUESTparseSelectorAct(1) /* we now have *almost* the same semantics for files and pipes, but we still need * to know we deal with a pipe, because we must do non-blocking opens in that case |