diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-03-15 17:25:26 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-03-15 17:25:26 +0100 |
commit | 66ab2a70e5bcc9637dfec89c6134abe10b96dde8 (patch) | |
tree | 20a8361a2167e760d689271b00ac77afa0e66baa /plugins | |
parent | 32df7bf254f8e82f4857d9d0f5eeb49d678d08c8 (diff) | |
download | rsyslog-66ab2a70e5bcc9637dfec89c6134abe10b96dde8.tar.gz rsyslog-66ab2a70e5bcc9637dfec89c6134abe10b96dde8.tar.xz rsyslog-66ab2a70e5bcc9637dfec89c6134abe10b96dde8.zip |
added message property parsesuccess to indicate status of higher level parser run
added message property parsesuccess to indicate if the last run
higher-level parser could successfully parse the message or not
(see property replacer html doc for details)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mmaudit/mmaudit.c | 3 | ||||
-rw-r--r-- | plugins/mmjsonparse/mmjsonparse.c | 3 | ||||
-rw-r--r-- | plugins/mmnormalize/mmnormalize.c | 3 |
3 files changed, 9 insertions, 0 deletions
diff --git a/plugins/mmaudit/mmaudit.c b/plugins/mmaudit/mmaudit.c index 8f2a3f71..fcefd013 100644 --- a/plugins/mmaudit/mmaudit.c +++ b/plugins/mmaudit/mmaudit.c @@ -210,6 +210,7 @@ BEGINdoAction int i; es_str_t *estr; char auditID[1024]; + int bSuccess = 0; CODESTARTdoAction pMsg = (msg_t*) ppString[0]; /* note that we can performance-optimize the interface, but this also @@ -278,6 +279,7 @@ dbgprintf("mmaudit: cookie found, type %d, auditID '%s', rest of message: '%s'\n ee_deleteEvent(pMsg->event); } pMsg->event = event; + bSuccess = 1; #if 1 /***DEBUG***/ // TODO: remove after initial testing - 2010-12-01 @@ -293,6 +295,7 @@ dbgprintf("mmaudit: cookie found, type %d, auditID '%s', rest of message: '%s'\n /***END DEBUG***/ #endif finalize_it: + MsgSetParseSuccess(pMsg, bSuccess); ENDdoAction diff --git a/plugins/mmjsonparse/mmjsonparse.c b/plugins/mmjsonparse/mmjsonparse.c index 5142f94b..03147b59 100644 --- a/plugins/mmjsonparse/mmjsonparse.c +++ b/plugins/mmjsonparse/mmjsonparse.c @@ -105,6 +105,7 @@ BEGINdoAction msg_t *pMsg; uchar *buf; struct ee_event *event; + int bSuccess = 0; CODESTARTdoAction pMsg = (msg_t*) ppString[0]; /* note that we can performance-optimize the interface, but this also @@ -138,6 +139,7 @@ dbgprintf("mmjsonparse: cookie found, rest of message: '%s'\n", buf); ee_deleteEvent(pMsg->event); } pMsg->event = event; + bSuccess = 1; #if 1 /***DEBUG***/ // TODO: remove after initial testing - 2010-12-01 @@ -153,6 +155,7 @@ dbgprintf("mmjsonparse: cookie found, rest of message: '%s'\n", buf); /***END DEBUG***/ #endif finalize_it: + MsgSetParseSuccess(pMsg, bSuccess); ENDdoAction diff --git a/plugins/mmnormalize/mmnormalize.c b/plugins/mmnormalize/mmnormalize.c index 7b92d820..c5b290f4 100644 --- a/plugins/mmnormalize/mmnormalize.c +++ b/plugins/mmnormalize/mmnormalize.c @@ -126,6 +126,9 @@ CODESTARTdoAction r = ln_normalize(pData->ctxln, str, &pMsg->event); if(r != 0) { DBGPRINTF("error %d during ln_normalize\n", r); + MsgSetParseSuccess(pMsg, 0); + } else { + MsgSetParseSuccess(pMsg, 1); } es_deleteStr(str); /***DEBUG***/ // TODO: remove after initial testing - 2010-12-01 |