Hello,
I defined the following custom template for my omfile targets to use:
$template fileFormat,"%timestamp:::date-rfc3339%
%hostname:R,ERE,1,BLANK:([a-zA-Z0-9-]*)--end:lowercase%
%syslogtag%%msg:::sp-if-no-1st-sp%%msg:::drop-last-lf%\n"
(the purpose being to reduce all hostnames to their short version)
I then defined this:
$ActionFileDefaultTemplate fileFormat
My omfile actions did not use the custom template however. Here's one:
# Windows Event logs
if $programname == 'MSWinEventLog' and not ( $hostname contains_i 'logstore1' )
then { action(type="omfile" file="/var/log/prod/eventlog") }
When I explicitly defined the template like so:
# Windows Event logs
if $programname == 'MSWinEventLog' and not ( $hostname contains_i 'logstore1' )
then { action(type="omfile" file="/var/log/prod/eventlog"
template="fileFormat") }
It worked.
Popped open omfile.c and it looked like it was supposed to be honoring the
ActionFileDefaultTemplate value, but I could be wrong.
Currently running off of "Version 6.3.11 [BETA] 2012-06-??".
Thanks,
-Lars
_______________________________________________
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