[syslog-ng] Use multiple templates for a single file?
Mikkel Leth Carlsen
mlca at tdc.dk
Fri Mar 23 08:48:19 CET 2012
Hi
Is it somehow possible to apply multiple templates to a single
destination/file? My current setup is something along the lines of:
destination dst_foo_1 {
file("foo_1.log" template(template_foo_1));
};
destination dst_foo_2 {
file("foo_2.log" template(template_foo_2));
};
template template_foo_1 {
template("$A $B $C");
};
template template_foo_2 {
template("$D $E $F");
};
log {
source(src_udp);
filter(filter_condition_1);
parser(parser_foo);
destination(dst_foo_1);
flags(final);
};
log {
source(src_udp);
filter(filter_condition_2);
parser(parser_foo);
destination(dst_foo_2);
flags(final);
};
However, I would really like to write log into a single file - but with
two different templates depending on the matched filter. Is that
possible? I don't suppose pointing both destinations to the same file
would be wise?
/Mikkel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.balabit.hu/pipermail/syslog-ng/attachments/20120323/1563b880/attachment.htm
More information about the syslog-ng
mailing list