Sample Syslog-NG Configuration: /etc/syslog-ng/syslog-ng.conf

options { long_hostnames(off); sync(0); };
source src { pipe("/proc/kmsg"); unix-stream("/dev/log"); internal(); };

filter f_mail       { facility(mail); };
filter f_imap       { facility(local4); };
filter f_cron       { facility(cron); };
filter f_warn       { level(warn, err, crit); };
filter f_alert      { level(alert); };
filter f_messages   { not facility(news, mail); };
filter f_weirdness  { match("[Dd]enied|[Ff]ail"); };

destination console { file("/dev/tty10"); };
destination xconsole { pipe("/dev/xconsole"); };
destination warn { file("/var/log/warn"); };
destination mail { file("/var/log/mail"); };
destination imap { file("/var/log/imap"); };
destination messages { file("/var/log/messages"); };
destination mailr00t { program("/usr/local/sbin/mailtoMick.sh"); };

log { source(src); filter(f_warn); destination(console); };
log { source(src); filter(f_warn); destination(xconsole); };
log { source(src); filter(f_warn); destination(warn); };
log { source(src); filter(f_mail); destination(mail); };
log { source(src); filter(f_local); destination(localmessages); };
log { source(src); filter(f_messages); destination(messages); };
log { source(src); filter(f_weirdness); destination(mailr00t); };