summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-07-11 10:08:16 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2011-07-11 10:08:16 +0200
commitd66d3d6033aae584bfc622f3f9dcddc4f152c308 (patch)
tree1d9b8097ef0f1c32bd2f0d6b038cfea4c58efc4c
parent398966be6d5a94d2602a08305b0533bf4a502a95 (diff)
downloadrsyslog-d66d3d6033aae584bfc622f3f9dcddc4f152c308.tar.gz
rsyslog-d66d3d6033aae584bfc622f3f9dcddc4f152c308.tar.xz
rsyslog-d66d3d6033aae584bfc622f3f9dcddc4f152c308.zip
added warning message for old-style outchannel syntax
-rw-r--r--doc/v4compatibility.html19
-rw-r--r--runtime/rsyslog.h1
-rw-r--r--tools/omfile.c9
3 files changed, 28 insertions, 1 deletions
diff --git a/doc/v4compatibility.html b/doc/v4compatibility.html
index 5d877af1..72b0f5a9 100644
--- a/doc/v4compatibility.html
+++ b/doc/v4compatibility.html
@@ -74,4 +74,23 @@ So it is a good idea to become ready for the new version now and also enjoy some
benefits of the &quot;real restart&quot;, like the better error-reporting capability.
<p>Note that code complexity reduction (and thus performance improvement) needs the restart-type
HUP code to be removed, so these changes can (and will) only happen in version 5.
+<h2>outchannels</h2>
+Note: as always documented, outchannels are an experimental feature that may be
+removed and/or changed in the future.
+There is one concrete change done starting with 4.6.7: let's assume an
+outchannel "mychannel" was defined. Then, this channel could be used inside an
+<code>
+*.* $mychannel
+</code>
+This is still supported and will remain to be supported in v4. However, there is
+a new variant which explicitely tells this is to be handled by omfile. This new
+syntax is as follows:
+<code>
+*.* :omfile:$mychannel
+</code>
+Note that future versions, specifically starting with v6, the older syntax is no
+longer supported. So users are strongly advised to switch to the new syntax. As an
+aid to the conversion process, rsyslog 4.7.4 and above issue a warning message
+if the old-style directive is seen -- but still accept the old syntax without
+any problems.
</body></html>
diff --git a/runtime/rsyslog.h b/runtime/rsyslog.h
index 52b29ac4..f14e0724 100644
--- a/runtime/rsyslog.h
+++ b/runtime/rsyslog.h
@@ -343,6 +343,7 @@ enum rsRetVal_ /** return value. All methods return this if not specified oth
RS_RET_FILE_NOT_SPECIFIED = -2180, /**< file name not configured where this was required */
RS_RET_ERR_WRKDIR = -2181, /**< problems with the rsyslog working directory */
RS_RET_WRN_WRKDIR = -2182, /**< correctable problems with the rsyslog working directory */
+ RS_RET_OUTDATED_STMT = -2184, /**< some outdated statement/functionality is being used in conf file */
/* RainerScript error messages (range 1000.. 1999) */
RS_RET_SYSVAR_NOT_FOUND = 1001, /**< system variable could not be found (maybe misspelled) */
diff --git a/tools/omfile.c b/tools/omfile.c
index f32da124..150848eb 100644
--- a/tools/omfile.c
+++ b/tools/omfile.c
@@ -720,7 +720,14 @@ CODESTARTparseSelectorAct
*/
if(!strncmp((char*) p, ":omfile:", sizeof(":omfile:") - 1)) {
p += sizeof(":omfile:") - 1;
- }
+ } else {
+ if(*p == '$') {
+ errmsg.LogError(0, RS_RET_OUTDATED_STMT,
+ "action '%s' treated as ':omfile:%s' - please "
+ "change syntax, '%s' will not be supported in "
+ "rsyslog v6 and above.", p, p, p);
+ }
+ }
if(!(*p == '$' || *p == '?' || *p == '/' || *p == '.' || *p == '-'))
ABORT_FINALIZE(RS_RET_CONFLINE_UNPROCESSED);