Hello list, my problem is the following one, syslog-ng does not write in the corresponding files according to the configuration. The configuration says that all the packages with facility mail, are written in a file, mail.log, whereas those of facility local7 in another file, according to the priority, info in $program.info.log and error in $program.error.log. Being $program the name of the program. In config of local7 I have writes in disc the following thing: template ("$FULLDATE <> $PROGRAM --$FACILITY-- <> $MSGONLY \ n") The problem is that some of the mail message with facility (among others facility's) are written like local7, when they would not have. An example is: 2007 Aug 29 06:25:58 <> cyrus --mail-- <> DBERROR: reading /var/lib/cyrus/db/skipstamp, assuming the worst: No such file or directory 2007 Aug 29 06:25:58 <> cyrus --mail-- <> IOERROR: opening /var/lib/cyrus/mailboxes.db: No such file or directory 2007 Aug 29 05:05:45 <> kernel --kern-- <> drbd0: incompatible states And the config file is: filter f_mail { facility(mail); }; destination df_mail { file("/var/log/mail.log" template("$FULLDATE <> $PROGRAM <> $MSGONLY\n") template_escape(no)); }; log { source(s_udp); filter(f_mail); destination(df_mail); filter f_local0_err { facility(local7) and level(warn) or level(err); }; destination df_local0_err { file("/var/log/$PROGRAM.error.log" template("$FULLDATE <> $PROGRAM --$FACILITY-- <> $MSGONLY\n") template_escape(no)); }; log { source(s_udp); filter(f_local0_err); destination(df_local0_err); }; Some idea of so that this happens? -- A greeting, Javier.
Hello,
filter f_local0_err { facility(local7) and level(warn) or level(err); };
I assume that instead of the above filter you wanted this: filter f_local0_err { facility(local7) and (level(warn) or level(err)); }; Regards, Sandor -------------------------------------------------------- NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.
participants (2)
-
Geller, Sandor (IT)
-
Javier Terceiro