From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 28 12:36:55 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 90CDB16A4E5 for ; Wed, 28 Apr 2004 12:36:55 -0700 (PDT) Received: from malasada.lava.net (malasada.lava.net [64.65.64.17]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3211843D49 for ; Wed, 28 Apr 2004 12:36:55 -0700 (PDT) (envelope-from cliftonr@lava.net) Received: by malasada.lava.net (Postfix, from userid 102) id 6B47C153882; Wed, 28 Apr 2004 09:36:50 -1000 (HST) Date: Wed, 28 Apr 2004 09:36:50 -1000 From: Clifton Royston To: freebsd-hackers@freebsd.org Message-ID: <20040428193649.GB274@tikitechnologies.com> Mail-Followup-To: freebsd-hackers@freebsd.org, Matt Freitag References: <20040428190057.09B0416A4D9@hub.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040428190057.09B0416A4D9@hub.freebsd.org> User-Agent: Mutt/1.4.2i X-Mailman-Approved-At: Thu, 29 Apr 2004 05:15:13 -0700 cc: Matt Freitag Subject: Re: Loosing STDOUT after file rotation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Apr 2004 19:36:55 -0000 > Date: Tue, 27 Apr 2004 16:43:29 -0500 > From: Matt Freitag > 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