Date: Thu, 27 Jun 1996 10:33:24 +0200 From: Lars Koeller <Lars_Koeller@odie.physik2.uni-rostock.de> To: taob@io.org, freebsd-questions@freefall.FreeBSD.org Subject: Re: Filtering rules in syslog.conf Message-ID: <199606270833.KAA09896@odie.physik2.uni-rostock.de> In-Reply-To: Mail from 'Brian Tao <taob@io.org>' dated: Wed, 26 Jun 1996 20:18:46 -0400 (EDT)
next in thread | previous in thread | raw e-mail | index | archive | help
Hi!
> I have a fairly simple requirement that I can't seem to get
> working with syslogd/syslog.conf. I would like all messages generated
> by a particular program to go to a particular file, and nowhere else.
> Is that possible?
>
> For example, this line will accomplish the first half of what I
> want:
>
> !telnetd
> *.* /var/log/telnetd.log
>
> The only problem is that the telnetd messages go to *both*
> /var/log/messages as well as /var/log/telnetd.log. How do I tell
> syslogd not to send to both? I know you can disable certain
> facilities with the "none" level, but that affects all messages, not
> just those coming from a particular program.
I've had a similar problem some weeks ago, and the only solution was
a modification of the source code. I wanted to use xntpd with a DCF-77
time code receiver, which had a lot of receiving errors during the day,
each producing a log message. I changed the line
openlog(cp, LOG_PID | LOG_NDELAY, LOG_NTP);
to
openlog(cp, LOG_PID | LOG_NDELAY, LOG_LOCAL0);
and made the following line in /etc/syslog.conf
*.err;kern.debug;auth.notice;mail.crit;local0.none /dev/console
*.err;local0.none root
*.notice;auth.debug;local0.none root
*.alert;local0.none root
*.emerg;local0.none *
!xntpd
*.* /var/log/xntpd
and it works well. If you get another solution please let ne know!
Regards
Lars
--
_________________________________________________________________________
Lars Köller Phone: +49 381/498-1665, Fax: -1667
University of Rostock E-Mail:
Department of Physics Lars_Koeller@odie.physik2.Uni-Rostock.DE
Universitätsplatz 3 Anonymous ftp:
D-18051 Rostock (Germany) ftp://odie.physik2.uni-rostock.de/pub
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199606270833.KAA09896>
