mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-17 21:00:42 +01:00
INCOMPATIBLE: use :, not =, as separator for jsonf
JSON fields are "name":value, not "name"=value. Therefore change the jsonf flag to use a colon. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
parent
7580b8c954
commit
e48728e80e
@ -368,7 +368,7 @@ The json option cannot be used together with either jsonf or csv options.
|
|||||||
This signifies that the property should be expressed as a json <b>f</b>ield.
|
This signifies that the property should be expressed as a json <b>f</b>ield.
|
||||||
That means not only the property is written, but rather a complete json field in
|
That means not only the property is written, but rather a complete json field in
|
||||||
the format<br>
|
the format<br>
|
||||||
"fieldname"="value"</b>
|
"fieldname":"value"</b>
|
||||||
where "filedname" is the assigend field name (or the property name if none was assigned)
|
where "filedname" is the assigend field name (or the property name if none was assigned)
|
||||||
and value is the end result of property replacer operation. Note that value supports
|
and value is the end result of property replacer operation. Note that value supports
|
||||||
all property replacer options, like substrings, case converson and the like.
|
all property replacer options, like substrings, case converson and the like.
|
||||||
|
|||||||
@ -2518,7 +2518,7 @@ jsonField(struct templateEntry *pTpe, uchar **ppRes, unsigned short *pbMustBeFre
|
|||||||
dst = es_newStr(buflen+es_strlen(pTpe->data.field.fieldName)+15);
|
dst = es_newStr(buflen+es_strlen(pTpe->data.field.fieldName)+15);
|
||||||
es_addChar(&dst, '"');
|
es_addChar(&dst, '"');
|
||||||
es_addStr(&dst, pTpe->data.field.fieldName);
|
es_addStr(&dst, pTpe->data.field.fieldName);
|
||||||
es_addBufConstcstr(&dst, "\"=\"");
|
es_addBufConstcstr(&dst, "\":\"");
|
||||||
CHKiRet(jsonAddVal(pSrc, buflen, &dst));
|
CHKiRet(jsonAddVal(pSrc, buflen, &dst));
|
||||||
es_addChar(&dst, '"');
|
es_addChar(&dst, '"');
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user