options { keep_hostname(yes); chain_hostnames(no); owner("administrator"); perm(0666); sync(0); }; source applications { unix-dgram("/dev/log"); internal(); }; source kernel { file("/dev/kmsg", log_prefix("kernel: ")); }; destination messages { file("/var/log/messages"); }; log { source(applications); destination(messages); }; log { source(kernel); destination(messages); }; filter windows { program(MSWinEventLog); }; destination windows { file("/var/log/syslog-ng.remote.hosts/windows-$HOST.log" perm(0666) dir_perm(0777) create_dirs(yes) template("$ISODATE <$FACILITY.$PRIORITY> $HOST $MSG\n") template_escape(no) ); }; log { source(s_remote); filter(windows); destination(windows); flags(final); }; source s_remote { udp(); tcp(); }; destination d_remote { file("/var/log/syslog-ng.remote.hosts/$HOST.log" perm(0666) dir_perm(0777) create_dirs(yes) ); }; log { source(s_remote); destination(d_remote); };