On Tue, Dec 17, 2013 at 9:48 AM, Pavel Levshin <[email protected]> wrote:
> 17.12.2013 12:31, Rainer Gerhards: > > Folks, >> >> I could need a bit of technical advise. There is a problem with the way >> logger /imuxsock work and JSON escaping. The details are here: >> >> http://kb.monitorware.com/post24048.html >> >> Feedback appreciated, I'd like to settle this within the next two days ;) >> > > Frankfully, I do not understand what topic starter wants to do. > > The template: > > template(name="plain_syslog" type="list") { > constant(value="{") > property(name="msg" format="json") > constant(value="\"}") > constant(value="\n") > } > > It should output something in curly braces, yes? Something alike to JSON > container? Why there is an unpaired double quote, by the way? > > I *think* he is trying to do some "offline json generation" (write file, push that somewhere). But that's only what I understand (and, yes, the quotes are most probably an error). > What it does now? > > What is it supposed to output? > > The above results in 'there is a \\n in here' >> > > So where are those curly braces? What is the real output? > > Sorry, I was puzzled about this, too, but forgot to mention what I think is meant. That's the output for just the msg property. > > My feeling is that logger is not supposed to allow escaped characters to > be passed to it's input. It does not decode anything. So, if JSON needs to > escape those slashes - this is the right behaviour. > > ah, that may be, in which case really no change is required. I should probably verify with a small C program... Rainer > > -- > Pavel Levshin > > _______________________________________________ > rsyslog mailing list > http://lists.adiscon.net/mailman/listinfo/rsyslog > http://www.rsyslog.com/professional-services/ > What's up with rsyslog? Follow https://twitter.com/rgerhards > NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad > of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you > DON'T LIKE THAT. > _______________________________________________ rsyslog mailing list http://lists.adiscon.net/mailman/listinfo/rsyslog http://www.rsyslog.com/professional-services/ What's up with rsyslog? Follow https://twitter.com/rgerhards NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.

