On Sat, 11 May 2013, Konrad Vrba wrote:

Dear rsyslog comunity,

could somebody please advise what would be the best way to change the
default time format

  May 11 09:20:04
to something more logical and "sortable", ie:
  2013-05-11 09:20:04

I know I can create my own template, such as:
$template mytime,"%$NOW% %timereported:8:15%
%programname%.%syslogseverity-text%: %msg:R:[^ ][^ ]*.*$--end%\n"

Byt I would prefer to change the default time format, so that I don't have
to specify mytime for every syslog rule. I would like to use mytime for
everything.

Try changing the default format (probably set by your distro) from RSYSLOG_TradtionalFileFormat to RSYSLOG_FileFormat

you can also set the default format and then not need to specify it in each action

$ActionFileDefaultTemplate myFormat
$ActionForwardDefaultTemplate myFormat

David Lang

_______________________________________________
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