It might be possible to extend the rfc3339 time format to rfc3339nano,
but that will break rfc5424 which allow up to microseconds precision
only. Similar already in use when rfc3164 syslog messages used with
rfc3339 timestamps.

https://github.com/rsyslog/rsyslog/search?p=1&q=date-rfc3339&unscoped_q=date-rfc3339
https://github.com/rsyslog/rsyslog/search?q=formatTimestamp3339&unscoped_q=formatTimestamp3339
https://github.com/rsyslog/rsyslog/search?q=tplFmtRFC3339Date&unscoped_q=tplFmtRFC3339Date
https://tools.ietf.org/html/rfc5424

Consider opening github request for the implementation.

Peter
On Fri, Oct 26, 2018 at 11:43 PM Jason Nordwick <[email protected]> wrote:
>
> Is there a way to get nanoseconds in and out of rsyslog? I'm using
> dateformat rfc3339, and it works find for micros, but at nanos, the
> timestamp gets correupted:
>
> property(name="timereported" dateFormat="rfc3339")
>
> Also, when writing out json formatted fields, is there a way to print out a
> numeric property? I would like to make syslogseverity a number, but I have
> been unsuccessful in creating a numeric json field. My workaround is to
> handcraft the entire json payload instead of using the jsonf option  on the
> template.
>
> Thanks,
> Jason
> _______________________________________________
> 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.

Reply via email to