On Mon, Apr 28, 2014 at 2:57 PM, Marcin Mirosław <[email protected]> wrote:
> W dniu 28.04.2014 14:18, Marcin Mirosław pisze: > > Hi again! > > I'd like to ask you about one more thing. I'm trying to have date entry > > as below (apache error log): > > [Mon Apr 28 00:00:02 2014] > > I have created an issue for this: https://github.com/rsyslog/rsyslog/issues/65 > 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. 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.

