summaryrefslogtreecommitdiffstats
path: root/runtime/queue.c
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2012-08-24 19:49:41 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2012-08-29 12:39:30 +0200
commit9bd45fcb72e0e3a2abd89fc7fe0d068c0d68e1de (patch)
treef0906fc7debbaf786a1df5cb728236c6a714777d /runtime/queue.c
parent1e09e2729e737e4512aa2205d72c537cce6d8cd6 (diff)
downloadrsyslog-9bd45fcb72e0e3a2abd89fc7fe0d068c0d68e1de.tar.gz
rsyslog-9bd45fcb72e0e3a2abd89fc7fe0d068c0d68e1de.tar.bz2
rsyslog-9bd45fcb72e0e3a2abd89fc7fe0d068c0d68e1de.zip
Add template support: parse text, convert to BSON
Uses a json-c library (http://oss.metaparadigm.com/json-c/). With this, a template > $template MongoTemplate,"{%hostname:::jsonf:sys%, %$!all-json:2:$:%" and action > & action(type="ommongodb" db="ceelog" collection="local" template="MongoTemplate") will store a record created by > logger -d -u p/dev/log -p mail.info -t mymailer '@cee: {"false": false, "null": null, "true": true, "object": {"a":"a", "b":"b"}, "array": [1, 2, 3], "number1": 3, "number2": 3.14, "string": "String"}' as > { "_id" : ObjectId("5037bbfc97dd811374ce5a00"), "sys" : "kulicka", "false" : "false", "null" : "-", "true" : "true", "object.a" : "a", "object.b" : "b", "array.*" : "3", "number1" : "3", "number2" : "3.140000", "string" : "String" } which is not great, but fair enough given the current design of libee (the information loss manifests by the time of template processing, ommongodb can't fix it). Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Diffstat (limited to 'runtime/queue.c')
0 files changed, 0 insertions, 0 deletions