[syslog-ng] Apache vhost logs
Gergely Nagy
algernon at balabit.hu
Thu Jul 14 12:05:53 CEST 2011
Josu Lazkano <josu.lazkano at barcelonamedia.org> writes:
> filter f_local5 {
> facility(local5);
> };
>
> destination d_apache {
> file("/var/log/apache.log");
> };
>
> log {
> source(s_all);
> filter(f_local5);
> destination(d_apache);
> };
>
> But I want to save the apache logs on a directory inside each host:
>
> destination extern {
> file("/var/log/extern/${HOST}/${YEAR}-${MONTH}/${FACILITY}");
> };
>
>
> I wan tto change the name "local5" to "apache"
That's not possible like this.
However, since you already filter on f_local5, you can add another
destination, along side extern:
destination d_apache {
file("/var/log/extern/${HOST}/${YEAR}-${MONTH}/apache");
};
(This would replace the d_apache you have in your configs now)
--
|8]
More information about the syslog-ng
mailing list