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.

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.

Reply via email to