svn commit: r194005 - head/etc

Andriy Gapon avg at freebsd.org
Thu Jun 11 15:15:34 UTC 2009


on 11/06/2009 18:07 Andriy Gapon said the following:
> Author: avg
> Date: Thu Jun 11 15:07:02 2009
> New Revision: 194005
> URL: http://svn.freebsd.org/changeset/base/194005
> 
> Log:
>   syslog.conf: pop up from logging only ppp messages at the end of file
>   
>   This allows to append custom rules at the end of the file without
>   risk of confusion that can result when one misses default !ppp line
>   and doesn't add another program specification and thus subsequent
>   selector(s) would belong to ppp program block.
>   
>   Requested by:	marck
>   Submitted by:	marck
>   Approved by:	jhb (mentor)
> 
> Modified:
>   head/etc/syslog.conf
> 
> Modified: head/etc/syslog.conf
> ==============================================================================
> --- head/etc/syslog.conf	Thu Jun 11 14:44:10 2009	(r194004)
> +++ head/etc/syslog.conf	Thu Jun 11 15:07:02 2009	(r194005)
> @@ -28,3 +28,4 @@ cron.*						/var/log/cron
>  # news.notice					/var/log/news/news.notice
>  !ppp
>  *.*						/var/log/ppp.log
> +!*

I forgot to add "MFC after", but  I think 2 weeks should be sufficient.

Another thing - it seems that the example in syslog.conf(5) is incorrect.
First, the manual says:

     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.

But then:
     # Save ftpd transactions along with mail and news
     !ftpd
     *.*                                                     /var/log/spoolerr

     # Log all security messages to a separate file.
     security.*                                              /var/log/security

     # Log all writes to /dev/console to a separate file.
     console.*                                               /var/log/console.log

If I am not mistaken, this is a classic example of the confusion that this commit
tries to prevent - the last two rules would apply only to messages from 'ftp', but
not to all messages as the comments say.

Unfortunately I am not very fluent with man page syntax (*roff), so if anybody
could provide a patch then I could commit it - I am sure that jhb would approve :-)


-- 
Andriy Gapon


More information about the svn-src-all mailing list