[syslog-ng]logging to two files simultaneously

Bill Nash syslog-ng@lists.balabit.hu
Wed, 9 Mar 2005 11:33:35 -0800 (PST)


On Wed, 9 Mar 2005, Mike Pepe wrote:

> I'm trying to log to two files at the same time. What's the best way to do 
> it?
>
> I put two destinations in a log block, but it doesn't log to both places.
>
> Is there a trick to doing this?
>

two log blocks.

destination hosts {

file("/var/syslog/HOSTS/$HOST/$YEAR/$MONTH/$HOST-$FACILITY-$YEAR$MONTH$DAY"
    owner(root) group(root) perm(0755) dir_perm(0755) create_dirs(yes));
};

destination bulklog {
    file("/var/syslog/AGGREGATE/$YEAR/$MONTH/$FACILITY-$YEAR$MONTH$DAY"
    owner(root) group(root) perm(0755) dir_perm(0755) create_dirs(yes));
};

log { source(external); destination(bulklog); };
log { source(external); destination(hosts); };

- billn