Hi Justin, I think this solves it. Not sure if it's the nicest way, though:
$template customdate,"%$day%-%timegenerated:1:3:date-rfc3164%-%$year% %timegenerated:12:23:date-rfc3339%" All the info about what it does should be in here: http://www.rsyslog.com/doc/property_replacer.html But if you have trouble figuring it out please let me know. I've tested it with rsyslog 7.2.2, so I don't know if the "older" version of rsyslog supports it. But this is the legacy template, so I don't think it can get much more legacy than this. Best regards, Radu 2013/1/4 Justin Houk <[email protected]> > Hi all, > > I've spent the better part of the day reading up on rsyslog and templates, > so I'm smarter about this than I used to be this morning, but I'm still > having trouble finding a solution to this particular problem: > > I'm trying to get an older version of rsyslog to use a template I'm > defining to print the %timegenerated% value in a very specific format, > specifically: > > DD-MMM-YYYY HH:MM:SS:MMM (e.g. 03-Jan-2013 17:14:35.999) > > I've figured out how to set up substrings in my template and how to use > predefined date formats like 'date-rfc3339', but I haven't figured out how > to specify the exact date format output like the style above. Can someone > help me connect the dots? > > Thanks so much! > --Justin > > This electronic message contains information which may be confidential or > privileged. The information is intended for the use of the individual or > entity named above. If you are not the intended recipient, be aware that > any disclosure, copying, distribution or use of the contents of this > information is prohibited. If you have received this electronic > transmission in error, please notify us by e-mail at ( > [email protected]) immediately. > _______________________________________________ > 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.

