diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2011-07-11 08:37:11 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2011-07-11 08:37:11 +0200 |
commit | 5442adf8f407594d6197e58db492f31048ac4f85 (patch) | |
tree | d85d664d5b7d68ecd521bfe235ffabd99e9fc859 | |
parent | f09ee69ee1b7f8c098d0720c8e85a6753cc7d342 (diff) | |
download | rsyslog-5442adf8f407594d6197e58db492f31048ac4f85.tar.gz rsyslog-5442adf8f407594d6197e58db492f31048ac4f85.tar.xz rsyslog-5442adf8f407594d6197e58db492f31048ac4f85.zip |
support for :omfile: forward compatibility directive
-rw-r--r-- | doc/log_rotation_fix_size.html | 2 | ||||
-rw-r--r-- | doc/rsyslog_conf_output.html | 2 | ||||
-rw-r--r-- | tools/omfile.c | 10 |
3 files changed, 11 insertions, 3 deletions
diff --git a/doc/log_rotation_fix_size.html b/doc/log_rotation_fix_size.html index 190b24cb..51edf033 100644 --- a/doc/log_rotation_fix_size.html +++ b/doc/log_rotation_fix_size.html @@ -34,7 +34,7 @@ Channels to achieve this. Putting the following directive</p> # outchannel definiation $outchannel log_rotation,/var/log/log_rotation.log, 52428800,/home/me/./log_rotation_script # activate the channel and log everything to it -*.* $log_rotation +*.* :omfile:$log_rotation # end log rotation via outchannel </pre></p> diff --git a/doc/rsyslog_conf_output.html b/doc/rsyslog_conf_output.html index c52aaa5e..426f2f27 100644 --- a/doc/rsyslog_conf_output.html +++ b/doc/rsyslog_conf_output.html @@ -49,7 +49,7 @@ does not activate it. To do so, you must use a selector line (see below). That selector line includes the channel name plus an $ sign in front of it. A sample might be:<br> <br> -*.* $mychannel<br> +*.* :omfile:$mychannel<br> <br> In its current form, output channels primarily provide the ability to size-limit an output file. To do so, specify a maximum size. When this diff --git a/tools/omfile.c b/tools/omfile.c index 487cf8a0..a4f010c6 100644 --- a/tools/omfile.c +++ b/tools/omfile.c @@ -16,7 +16,7 @@ * pipes. These have been moved to ompipe, to reduced the entanglement * between the two different functionalities. -- rgerhards * - * Copyright 2007-2009 Rainer Gerhards and Adiscon GmbH. + * Copyright 2007-2011 Rainer Gerhards and Adiscon GmbH. * * This file is part of rsyslog. * @@ -646,6 +646,14 @@ ENDdoAction BEGINparseSelectorAct CODESTARTparseSelectorAct + /* Note: the indicator sequence permits us to use '$' to signify + * outchannel, what otherwise is not possible due to truely + * unresolvable grammar conflicts (*this time no way around*). + * rgerhards, 2011-07-09 + */ + if(!strncmp((char*) p, ":omfile:", sizeof(":omfile:") - 1)) { + p += sizeof(":omfile:") - 1; + } if(!(*p == '$' || *p == '?' || *p == '/' || *p == '.' || *p == '-')) ABORT_FINALIZE(RS_RET_CONFLINE_UNPROCESSED); |