Bug 17022

Summary: newsyslog.conf not in sync with syslog.conf - all.log entry should be commented out
Product: Base System Reporter: ncbp <ncbp>
Component: confAssignee: Robert Watson <rwatson>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.0-CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description ncbp 2000-02-27 19:32:00 UTC
>Number:         17022
>Category:       conf
>Synopsis:       newsyslog.conf not in sync with syslog.conf - all.log entry should be commented out
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Feb 27 11:40:01 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Niels Chr. Bank-Pedersen
>Release:        FreeBSD 4.0-CURRENT i386
>Organization:
NA
>Environment:

	FreeBSD 4.0-CURRENT as of 20000227

>Description:

	In a default installation the entry for "all.log" is commented
        out in syslog.conf, but is active in newsyslog.conf with the result
        that an empty file is rotated and compressed every night.

>How-To-Repeat:

	ls -l /var/log/all*
        -rw-------  1 root  wheel  61 27 Feb 00:00 /var/log/all.log
        -rw-r--r--  1 root  wheel  86 27 Feb 00:00 /var/log/all.log.0.gz

>Fix:


--- /usr/src/etc/newsyslog.conf.orig    Sat Feb 26 13:21:09 2000
+++ /usr/src/etc/newsyslog.conf Sun Feb 27 20:10:16 2000
@@ -9,7 +9,7 @@
 /var/log/maillog                       664  7     *    @T00  Z
 /var/log/sendmail.st                   664  10    *    168   B
 /var/log/messages                      664  5     100  *     Z
-/var/log/all.log                       600  7     *    @T00  Z
+#/var/log/all.log                      600  7     *    @T00  Z
 /var/log/slip.log                      600  3     100  *     Z
 /var/log/ppp.log                       600  3     100  *     Z
 /var/log/security                      600  10    100  *     Z


>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Comment 1 ncbp 2000-02-27 19:40:01 UTC
	In a default installation the entry for "all.log" is commented
        out in syslog.conf, but is active in newsyslog.conf with the result
        that an empty file is rotated and compressed every night.

How-To-Repeat: 
	ls -l /var/log/all*
        -rw-------  1 root  wheel  61 27 Feb 00:00 /var/log/all.log
        -rw-r--r--  1 root  wheel  86 27 Feb 00:00 /var/log/all.log.0.gz
Comment 2 Sheldon Hearn 2000-03-01 07:54:03 UTC
On Sun, 27 Feb 2000 20:32:00 +0100, ncbp@pebbles.tele.dk wrote:

> -/var/log/all.log                       600  7     *    @T00  Z
> +#/var/log/all.log                      600  7     *    @T00  Z

You can't do this without changing the comment in /etc/syslog.conf.
Actually, the comment in syslog.conf already needs changing; it's
misleading in that it can be read to imply that all.log doesn't need to
exist.

Ciao,
Sheldon.
Comment 3 Sheldon Hearn freebsd_committer freebsd_triage 2000-03-01 07:54:27 UTC
Responsible Changed
From-To: freebsd-bugs->rwatson

This is Robert's invention. 

Comment 4 Robert Watson 2000-03-01 17:50:28 UTC
On Wed, 1 Mar 2000, Sheldon Hearn wrote:

> The following reply was made to PR conf/17022; it has been noted by GNATS.
> 
> From: Sheldon Hearn <sheldonh@uunet.co.za>
> To: ncbp@bank-pedersen.dk
> Cc: FreeBSD-gnats-submit@FreeBSD.ORG
> Subject: Re: conf/17022: newsyslog.conf not in sync with syslog.conf - all.log entry should be commented 
> Date: Wed, 01 Mar 2000 09:54:03 +0200
> 
>  On Sun, 27 Feb 2000 20:32:00 +0100, ncbp@pebbles.tele.dk wrote:
>  
>  > -/var/log/all.log                       600  7     *    @T00  Z
>  > +#/var/log/all.log                      600  7     *    @T00  Z
>  
>  You can't do this without changing the comment in /etc/syslog.conf.
>  Actually, the comment in syslog.conf already needs changing; it's
>  misleading in that it can be read to imply that all.log doesn't need to
>  exist.

The current arrangement worked fine, but the comment should have been
expanded to indicate that the log file should be touch'd before it may be
used.  By default, syslogd will not log to a file that does not already
exist, and newsyslog will not create it.  As such, the newsyslog entry
should be fine (non-existent files won't be rotated).  At least, this is
my experience--were specific problems being experienced or was this a ``it
just seems wrong''?

  Robert N M Watson 

robert@fledge.watson.org              http://www.watson.org/~robert/
PGP key fingerprint: AF B5 5F FF A6 4A 79 37  ED 5F 55 E9 58 04 6A B1
TIS Labs at Network Associates, Safeport Network Services
Comment 5 Niels Christian Bank-Pedersen 2000-03-01 19:53:19 UTC
On Wed, Mar 01, 2000 at 12:50:28PM -0500, Robert Watson wrote:
> On Wed, 1 Mar 2000, Sheldon Hearn wrote:
> 
> > The following reply was made to PR conf/17022; it has been noted by GNATS.
> > 
> > From: Sheldon Hearn <sheldonh@uunet.co.za>
> > To: ncbp@bank-pedersen.dk
> > Cc: FreeBSD-gnats-submit@FreeBSD.ORG
> > Subject: Re: conf/17022: newsyslog.conf not in sync with syslog.conf - all.log entry should be commented 
> > Date: Wed, 01 Mar 2000 09:54:03 +0200
> > 
> >  On Sun, 27 Feb 2000 20:32:00 +0100, ncbp@pebbles.tele.dk wrote:
> >  
> >  > -/var/log/all.log                       600  7     *    @T00  Z
> >  > +#/var/log/all.log                      600  7     *    @T00  Z
> >  
> >  You can't do this without changing the comment in /etc/syslog.conf.
> >  Actually, the comment in syslog.conf already needs changing; it's
> >  misleading in that it can be read to imply that all.log doesn't need to
> >  exist.
> 
> The current arrangement worked fine, but the comment should have been
> expanded to indicate that the log file should be touch'd before it may be
> used.  By default, syslogd will not log to a file that does not already
> exist, and newsyslog will not create it.  As such, the newsyslog entry
> should be fine (non-existent files won't be rotated).  At least, this is
> my experience--were specific problems being experienced or was this a ``it
> just seems wrong''?

Seeing this, I guess it was an ``it just seems wrong'' kind of thing.
The specific problem experienced was triggered because I (for what I
thought would be consistency) touched the logfile myself.
Your experience is right--the file won't get created and thus not
rotated if you don't mess with the defaults.  I guess the PR can be
closed--I'm probably the only one annoyed by what looks like an
inconsistency, but in fact isn't   :-)

Perhaps an addition to the comment in /etc/syslog.conf like
``uncomment this and touch /var/log/all.log to enable logging of all
log messages in one file'' as pointed out by Sheldon Hearn, would be
the best solution.

>   Robert N M Watson 


/Niels Chr.

-- 
 Niels Christian Bank-Pedersen, NCB1-RIPE.
 Network Manager, Tele Danmark NET, IP-section.

 "Hey, are any of you guys out there actually *using* RFC 2549?"
Comment 6 Sheldon Hearn 2000-03-13 10:56:26 UTC
On Wed, 01 Mar 2000 12:50:28 EST, Robert Watson wrote:

> >  You can't do this without changing the comment in /etc/syslog.conf.
> >  Actually, the comment in syslog.conf already needs changing; it's
> >  misleading in that it can be read to imply that all.log doesn't need to
> >  exist.
> 
> The current arrangement worked fine, but the comment should have been
> expanded to indicate that the log file should be touch'd before it may be
> used.

Yes, that's what I was getting at. :-)

Ciao,
Sheldon.
Comment 7 Jeroen Ruigrok van der Werven freebsd_committer freebsd_triage 2001-10-28 13:33:18 UTC
State Changed
From-To: open->closed

Fixed in v1.17 of syslog.conf 

Thanks!