From owner-freebsd-questions Thu Jun 27 01:34:41 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id BAA10131 for questions-outgoing; Thu, 27 Jun 1996 01:34:41 -0700 (PDT) Received: from odie.physik2.uni-rostock.de (odie.physik2.uni-rostock.de [139.30.40.28]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id BAA10118 for ; Thu, 27 Jun 1996 01:34:19 -0700 (PDT) Received: (from lkoeller@localhost) by odie.physik2.uni-rostock.de (8.6.12/8.6.9) id KAA09896; Thu, 27 Jun 1996 10:33:24 +0200 Date: Thu, 27 Jun 1996 10:33:24 +0200 From: Lars Koeller Message-Id: <199606270833.KAA09896@odie.physik2.uni-rostock.de> X-Face: nLQGe[[K51[{{[C\,BiQm[7]u1m{N>_\%nLBo4t@)CoZ}hK[W7DwX&V=}Wf#Qb,j:Jpj[(12r=b~:dYmh]fDf\, ]_frt6eM' dated: Wed, 26 Jun 1996 20:18:46 -0400 (EDT) Sender: owner-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk 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