Just add an additional log line or additional destination.
log { source(src); destination(dmysql); destination(maillog); };
or
log { source(src); destination(dmysql); };
log { source(src); destination(maillog); };
Regards,
Drew
-----Original Message-----
From: Bas Koot [mailto:bask@tiscali.nl]
Sent: Thursday, May 01, 2003 5:43 PM
To: syslog-ng(a)lists.balabit.hu
Subject: [syslog-ng]Simple question, MySQL & Log file
Hi everybody!
First of all, i like Syslog-NG ! But i have 1 (simple i think) question
about it. For my postfix i need to use the /var/log/maillog file (for the
pop-before-smtp feature) but at this moment everything is putted into the
MySQL database.
Somebody knows how to get the mail data in the database AND into the log
file?
My current config:
# sources
source src { unix-stream("/dev/log"); internal(); };
source kernsrc { file("/proc/kmsg"); };
# destinations
destination dmysql {
pipe("/tmp/mysql.pipe"
template("INSERT INTO logs (host,facility,priority,level,tag,
timestamp,program,msg) VALUES ('$HOST','$FACILITY',
'$PRIORITY','$LEVEL','$TAG','$UNIXTIME','$PROGRAM',
'$MSG');\n")
template-escape(yes));
};
destination maillog { file("/var/log/maillog"); };
# logs
log { source(src); destination(dmysql); };
log { source(kernsrc); destination(dmysql); };
Thanks!
Greetings,
Bas Koot.