Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Apr 2004 09:36:50 -1000
From:      Clifton Royston <cliftonr@tikitechnologies.com>
To:        freebsd-hackers@freebsd.org
Cc:        Matt Freitag <mpf@inodes.us>
Subject:   Re: Loosing STDOUT after file rotation
Message-ID:  <20040428193649.GB274@tikitechnologies.com>
In-Reply-To: <20040428190057.09B0416A4D9@hub.freebsd.org>
References:  <20040428190057.09B0416A4D9@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
> Date: Tue, 27 Apr 2004 16:43:29 -0500
> From: Matt Freitag <mpf@inodes.us>
> Subject: Re: Loosing STDOUT after file rotation
>
> DJB's code, a last resort? I surely wouldn't refer to all of it as a 
> last resort, not in the least. To each his own - of course. Although I 
> certainly think you're belittling someone with plenty of skill. Do you 
> regard Qmail as a "last resort" MTA? I'd have to disagree strongly there.

  On qmail, I think others have covered its vices adequately.  If
forced at gunpoint to choose between qmail and sendmail, I'd probably
choose qmail over the security issues; but I'm very pleased to be able
to run Postfix instead of either choice.  (Some of the qmail issues
that were mentioned I have heard are easily fixed or worked around, but
DJB's attitude of tight-fisted control means those fixes will probably
never become defaults.)

  OTOH, after years of running Bind versions from 4 to 9, I'll
*happily* choose to run dnscache over Bind as a "first resort" for
caching nameserver any day.  No more wedged nameservers, no more
elaborate kludges of scripts to test and restart named, no more bloat
to eat all RAM in the machine, etc.  (And I've looked at some Bind
source too.  Erk.)  Thus, you win some, you lose some.

  The moral I draw: DJB's code, like every other set of source code,
falls somewhere along the continuum of quality.  It's better and more
reliable than some code, less than others.  I suspect the reputation
some hold DJB in, like Theo de Raadt's, is due more to their
personality traits than to close observation of the performance and
reliability of the code they're responsible for.

  Diatribes aside, and getting back to the original issue of logging: 

  At least from the little I understand of DJB multilog, it looked to
me like using it would require you to significantly rework your logging
code.  Logging to the syslog facility is another way to do it, but the
message loss issue gets very ugly if you ever start logging between
servers.  A more lightweight log rotation script like the apache
logrotate, and adding a short routine to your program to catch a SIGHUP
or SIGUSR1 and reopen the log file, is probably closer to what you're
looking for.

  BSD/OS long had a very nice "rotate" shell script for log files as
part of their standard distro, with a hook to trigger a daemon restart
or log reopens as needed, but unfortunately I don't know its license
and copyright status.  It would be nice to add something like that into
the FreeBSD base distribution - it's not like log rotation is a feature
needed only on rare installations.
  -- Clifton

-- 
          Clifton Royston  --  cliftonr@tikitechnologies.com 
         Tiki Technologies Lead Programmer/Software Architect
Did you ever fly a kite in bed?  Did you ever walk with ten cats on your head?
  Did you ever milk this kind of cow?  Well we can do it.  We know how.
If you never did, you should.  These things are fun, and fun is good.
                                                                 -- Dr. Seuss



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040428193649.GB274>