On Tue, Apr 29, 2014 at 3:48 PM, Rainer Gerhards <[email protected]>wrote:
> On Tue, Apr 29, 2014 at 10:18 AM, Marcin Mirosław <[email protected]> wrote: > >> W dniu 28.04.2014 17:47, Rainer Gerhards pisze: >> >> with: >> >> %timestamp:::date-rfc3189% %$year% >> >> I only need to add day of the week but I don't have idea how to do it. >> >> >> > >> > Day of the week is pretty clumsy to do without an enhancement. The idea >> is: >> > >> > 1. define a template which just has the unix date (timestamp) >> > 2. assing this to a local variable >> > 3. compute the weekday number based on the usual algo >> > 4. do an if-elseif series to set a local variable to the right day >> string >> > 5. use that day string inside the "real" template >> > >> > ... doable... but extremely ugly and slow. >> >> So I'll wait for pretty solution:) >> > > I have added "date-wdayname" (and list property option "wdayname") to git > master branch. I'll also add other formats (like day, month, ...) but I > thought if you want to try it out, you can now do so. > > I have now completed the remaining support. More info inside the bug tracker: https://github.com/rsyslog/rsyslog/issues/65 The new options are currently documented here: https://github.com/rsyslog/rsyslog-doc/blob/e495b14d49e1df2b18bbe6745033d8977bd98330/source/configuration/property_replacer.rst Rainer _______________________________________________ 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.

