I have a log file (using imfile) which has lines which have dates like this:

Apr 30 03:15:15 .....

I'm able to parse this out with a rulebase:

prefix=%time:date-rfc3164% %host:word%
...

But now I want to format this as an rfc3339 timestamp:

constant(value="\"time\":\"") property(name="$!time" dateFormat="rfc3339")

But this isn't working. It doesn't seem as if the time is parsed into a time_t. I see in the code that there is a function that will parse this string into an internal time_t-like representation which can be then formatted in other ways: ParseTIMESTAMP3164

But I can't figure out how to invoke this on my date string.

_______________________________________________
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