[syslog-ng] Setting and using variables
Fabien Wernli
wernli at in2p3.fr
Mon Mar 25 14:24:28 UTC 2019
I think you're misunderstanding the template concept.
A template is there to tell syslog-ng in what format each message will be
written to the destination.
I might be misunderstanding, but if you want the same template, different
files but only one destination, this could be what you want:
template my_template {
template("$DATE $HOST $PROGRAM $MESSAGE\n");
};
destination d_file {
file(
"/var/log/remote/backup/$location/$HOST/$app/${HOST}_$app.log"
template(my_template)
);
};
More information about the syslog-ng
mailing list