[syslog-ng] Help with db_parser()

Matthew Hall mhall at mhcomputing.net
Thu Dec 16 22:15:10 CET 2010

On Thu, Dec 16, 2010 at 01:10:27PM -0800, Matthew Hall wrote:
> Here's an example of a template 
> to use for an output file:
> template t_welf {
>     template("time=\"$R_DATE\" fw=\"$HOST\" pri=\"$LEVEL_NUM\" foo=\"$bar\"\n");
>     template_escape(no);
> };

I forgot to mention. Of course fill in the foo=$bar part with the names 
of your variables. One thing you can do is use perl, sed, awk, or egrep 
to grab every single variable name from your XMLs, and add them all to 
your messages in some convenient order (I often go with alphabetical 
order myself).


More information about the syslog-ng mailing list