On Mon, Feb 2, 2015 at 10:01 AM, Xavier Fustero <[email protected]> wrote:
> Replying myself....
>
>
> It seems you need to redefine the generic template in the rsyslog.conf
> adding these pri-text:
>
> $template TraditionalFormatWithPRI,"%pri-text%: %timestamp% %HOSTNAME%
> %syslogtag%%msg:::drop-last-lf%\n"
> $ActionFileDefaultTemplate TraditionalFormatWithPRI
>
> Now it works!
>
> Xavi
>

You can also specify a template for the output for specific actions.

eg.

template(name="TraditionalFormatWithPRI" type="string"
string="%pri-text%: %timestamp% %HOSTNAME%
%syslogtag%%msg:::drop-last-lf%\n")
action(type="omfile" DynaFile="rails_app" Template="TraditionalFormatWithPRI")

That way you don't have to override the default template.

Tait
_______________________________________________
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