[syslog-ng] syslog-ng error

Javier Terceiro correolista at gmail.com
Wed Aug 29 10:54:06 CEST 2007


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.


More information about the syslog-ng mailing list