From owner-freebsd-bugs@FreeBSD.ORG Wed Feb 4 18:10:12 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1317516A4CE for ; Wed, 4 Feb 2004 18:10:12 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 027C143D1D for ; Wed, 4 Feb 2004 18:10:08 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i152A7FR013815 for ; Wed, 4 Feb 2004 18:10:07 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i152A7Ns013814; Wed, 4 Feb 2004 18:10:07 -0800 (PST) (envelope-from gnats) Date: Wed, 4 Feb 2004 18:10:07 -0800 (PST) Message-Id: <200402050210.i152A7Ns013814@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: "Kline, Erik" Subject: Re: conf/62368: 5.2-RELEASE syslog.conf appears to be malformed X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: "Kline, Erik" List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2004 02:10:12 -0000 The following reply was made to PR conf/62368; it has been noted by GNATS. From: "Kline, Erik" To: "Pat Lashley" Cc: Subject: Re: conf/62368: 5.2-RELEASE syslog.conf appears to be malformed Date: Wed, 4 Feb 2004 18:05:32 -0800 This is a multi-part message in MIME format. ------_=_NextPart_001_01C3EB8C.896BD480 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable so when writing scripts that make custom mods to syslog.conf I need to cat >> /etc/syslog.conf something like: !* local2.info @some.log.host Is this correct? Thanks for pointing out the section of the man page I didn't quite get down to! On Wed, 4 Feb 2004, Pat Lashley wrote: > --On Wednesday, February 04, 2004 17:24:17 -0800 Erik Kline = wrote: > > >> Number: 62368 > >> Category: conf > >> Synopsis: 5.2-RELEASE syslog.conf appears to be malformed > > > >> Description: > > /etc/syslog.conf contains the following lines at the tail end of the = file: > > > > !startslip > > *.* /var/log/slip.log > > !ppp > > *.* /var/log/ppp.log > > > > These don't appear to be syntactically valid. Any entries appended > > after these aren't parsed and processed. CVSup today (04 Feb 2004) > > shows that /usr/src/etc/syslog.conf remains malformed. > > man syslog.conf: > > Each block of lines is separated from the previous block by a = program or > hostname specification. A block will only log messages = corresponding to > the most recent program and hostname specifications given. Thus, = with a > block which selects `ppp' as the program, directly followed by a = block > that selects messages from the hostname `dialhost', the second = block will > only log messages from the ppp(8) program on dialhost. > > A program specification is a line beginning with `#!prog' or = `!prog' (the > former is for compatibility with the previous syslogd, if one is = sharing > syslog.conf files, for example) and the following blocks will be = associ- > ated with calls to syslog(3) from that specific program. A = program spec- > ification for `foo' will also match any message logged by the = kernel with > the prefix `foo: '. The `#!+prog' or `!+prog' specification = works just > like the previous one, and the `#!-prog' or `!-prog' = specification will > match any message but the ones from that program. A hostname = specifica- > tion of the form `#+hostname' or `+hostname' means the following = blocks > will be applied to messages received from the specified hostname. = Alter- > natively, the hostname specification `#-hostname' or `-hostname' = causes > the following blocks to be applied to messages from any host but = the one > specified. If the hostname is given as `@', the local hostname = will be > used. A program or hostname specification may be reset by giving = the > program or hostname as `*'. > > The reason that lines added after that point don't appear to be > parsed or processed is that they apply only to messages from programs > named 'ppp'. > > > > -Pat > ------_=_NextPart_001_01C3EB8C.896BD480 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Re: conf/62368: 5.2-RELEASE syslog.conf appears to be = malformed

so when writing scripts that make custom mods to = syslog.conf I need to
cat >> /etc/syslog.conf something like:

!*
local2.info     =         @some.log.host

Is this correct? Thanks for pointing out the section = of the man page I
didn't quite get down to!

On Wed, 4 Feb 2004, Pat Lashley wrote:

> --On Wednesday, February 04, 2004 17:24:17 -0800 = Erik Kline <kline@netapp.com> wrote:
>
> >> = Number:         62368
> >> = Category:       conf
> >> = Synopsis:       5.2-RELEASE syslog.conf = appears to be malformed
> >
> >> Description:
> > /etc/syslog.conf contains the following = lines at the tail end of the file:
> >
> > !startslip
> > = *.*           &nbs= p;            = ;            =          = /var/log/slip.log
> > !ppp
> > = *.*           &nbs= p;            = ;            =          /var/log/ppp.log
> >
> > These don't appear to be syntactically = valid. Any entries appended
> > after these aren't parsed and processed. = CVSup today (04 Feb 2004)
> > shows that /usr/src/etc/syslog.conf remains = malformed.
>
> man syslog.conf:
>
>      Each block of = lines is separated from the previous block by a program or
>      hostname = specification.  A block will only log messages corresponding = to
>      the most recent = program and hostname specifications given.  Thus, with a
>      block which = selects `ppp' as the program, directly followed by a block
>      that selects = messages from the hostname `dialhost', the second block will
>      only log messages = from the ppp(8) program on dialhost.
>
>      A program = specification is a line beginning with `#!prog' or `!prog' (the
>      former is for = compatibility with the previous syslogd, if one is sharing
>      syslog.conf files, = for example) and the following blocks will be associ-
>      ated with calls to = syslog(3) from that specific program.  A program spec-
>      ification for = `foo' will also match any message logged by the kernel with
>      the prefix `foo: = '.  The `#!+prog' or `!+prog' specification works just
>      like the previous = one, and the `#!-prog' or `!-prog' specification will
>      match any message = but the ones from that program.  A hostname specifica-
>      tion of the form = `#+hostname' or `+hostname' means the following blocks
>      will be applied to = messages received from the specified hostname.  Alter-
>      natively, the = hostname specification `#-hostname' or `-hostname' causes
>      the following = blocks to be applied to messages from any host but the one
>      specified.  = If the hostname is given as `@', the local hostname will be
>      used.  A = program or hostname specification may be reset by giving the
>      program or = hostname as `*'.
>
> The reason that lines added after that point = don't appear to be
> parsed or processed is that they apply only to = messages from programs
> named 'ppp'.
>
>
>
> -Pat
>

------_=_NextPart_001_01C3EB8C.896BD480--