[syslog-ng]separating logs by hostname

Greg Heim gheim@hitel.com
Thu, 14 Jun 2001 13:16:34 -0400


I keep reading that syslog-ng has the capability to divert into
different log files based on hostname.  I'm doing this with an older
version by manually specifying for each machine as shown below.  I'd
like to avoid mucking with the config file every time we add or remove a
machine (all the time).  I've downloaded 1.5.7, but can't find any
examples of this.  Is there a simple way to do this or do I need to just
add an entry for every new host?

filter f_shaggy { host(shaggy); };
destination d_shaggy { file("/var/syslog-ng/shaggy"); };
log { source(src);
   filter(f_shaggy);
   destination(d_shaggy);
};

TIA,

Greg