Sun, 04 Jan 2004, by dylan@dylan.me.uk:
Hi all,
I've set up syslog on my gateway to forward all messages to a server and rotate its own logs out on a daily basis. So far so good, the server is logging for the gateway with no problem. That said, I'd like to filter off the forwarded messages to a separate file, say /var/log/ gateway.messages but I can see no options in syslog.conf (and the docs) to accomplish this. Is it possible? How can I go about it?
Make a fifo (man mkfifo), pipe syslog messages to the fifo, read in with an awk|perl|bash|.. script that outputs to a file if it sees a particular (hostname) regexp. Theo -- Theo v. Werkhoven Registered Linux user# 99872 http://counter.li.org ICBM 52 13 27N , 4 29 45E. SUSE 8.2 Kernel k_athlon-2.4.20 See headers for PGP/GPG info.