summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--doc/v7compatibility.html10
-rw-r--r--runtime/msg.c12
3 files changed, 23 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 9a7fdbf6..8573f408 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,8 @@
---------------------------------------------------------------------------
Version 7.1.4 [devel] 2012-09-??
+- implemented ability for CEE-based properties to be stored in disk queues
- introduced full JSON support for variable manipulation
-- intorduced "subtree"-type tempalates
+- introduced "subtree"-type tempalates
- bugfix: MsgDup() did not copy CEE structure
This function was called at various places, most importantly during
"last messages repeated n times" processing and omruleset. If CEE(JSON)
diff --git a/doc/v7compatibility.html b/doc/v7compatibility.html
index 612c3d6e..be89f666 100644
--- a/doc/v7compatibility.html
+++ b/doc/v7compatibility.html
@@ -17,9 +17,17 @@ BSD style blocks are no longer supported (for good reason). See the
<a href="http://www.rsyslog.com/g/BSD">rsyslog BSD blocks info</a>
page for more information and how to upgrade your config.
<p>[<a href="manual.html">manual index</a>] [<a href="http://www.rsyslog.com/">rsyslog site</a>]</p>
+
+<h2>CEE-Properties</h2>
+In rsyslog v6, CEE properties could not be used across disk-based queues. If this was
+done, there content was reset. This was a missing feature in v6. In v7, this feature
+has been implemented. Consequently, situations where the previous behaviour were
+desired need now to be solved differently. We do not think that this will cause any
+problems to anyone, especially as in v6 this was announced as a missing feature.
+
<p><font size="2">This documentation is part of the
<a href="http://www.rsyslog.com/">rsyslog</a> project.<br>
-Copyright &copy; 2011 by <a href="http://www.gerhards.net/rainer">Rainer Gerhards</a> and
+Copyright &copy; 2011-2012 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 2 or higher.</font></p>
</body></html>
diff --git a/runtime/msg.c b/runtime/msg.c
index 1ec93d9e..d3c814e2 100644
--- a/runtime/msg.c
+++ b/runtime/msg.c
@@ -1090,6 +1090,10 @@ static rsRetVal MsgSerialize(msg_t *pThis, strm_t *pStrm)
CHKiRet(obj.SerializeProp(pStrm, UCHAR_CONSTANT("pszRcvFrom"), PROPTYPE_PSZ, (void*) psz));
psz = getRcvFromIP(pThis);
CHKiRet(obj.SerializeProp(pStrm, UCHAR_CONSTANT("pszRcvFromIP"), PROPTYPE_PSZ, (void*) psz));
+ if(pThis->json != NULL) {
+ psz = (uchar*) json_object_get_string(pThis->json);
+ CHKiRet(obj.SerializeProp(pStrm, UCHAR_CONSTANT("json"), PROPTYPE_PSZ, (void*) psz));
+ }
objSerializePTR(pStrm, pCSStrucData, CSTR);
objSerializePTR(pStrm, pCSAPPNAME, CSTR);
@@ -3562,6 +3566,8 @@ rsRetVal MsgSetProperty(msg_t *pThis, var_t *pProp)
prop_t *myProp;
prop_t *propRcvFrom = NULL;
prop_t *propRcvFromIP = NULL;
+ struct json_tokener *tokener;
+ struct json_object *json;
DEFiRet;
ISOBJ_TYPE_assert(pThis, msg);
@@ -3616,6 +3622,12 @@ rsRetVal MsgSetProperty(msg_t *pThis, var_t *pProp)
MsgSetRulesetByName(pThis, pProp->val.pStr);
} else if(isProp("pszMSG")) {
dbgprintf("no longer supported property pszMSG silently ignored\n");
+ } else if(isProp("json")) {
+ tokener = json_tokener_new();
+ json = json_tokener_parse_ex(tokener, (char*)rsCStrGetSzStrNoNULL(pProp->val.pStr),
+ cstrLen(pProp->val.pStr));
+ json_tokener_free(tokener);
+ msgAddJSON(pThis, (uchar*)"!", json);
} else {
dbgprintf("unknown supported property '%s' silently ignored\n",
rsCStrGetSzStrNoNULL(pProp->pcsName));