From owner-freebsd-questions@FreeBSD.ORG Thu Jan 13 20:54:58 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69AFF1065670 for ; Thu, 13 Jan 2011 20:54:58 +0000 (UTC) (envelope-from tundra@tundraware.com) Received: from ozzie.tundraware.com (ozzie.tundraware.com [75.145.138.73]) by mx1.freebsd.org (Postfix) with ESMTP id 09B098FC1D for ; Thu, 13 Jan 2011 20:54:57 +0000 (UTC) Received: from [0.0.0.0] (ozzie.tundraware.com [75.145.138.73]) (authenticated bits=0) by ozzie.tundraware.com (8.14.4/8.14.4) with ESMTP id p0DKsn5e074746 (version=TLSv1/SSLv3 cipher=DHE-DSS-CAMELLIA256-SHA bits=256 verify=NO) for ; Thu, 13 Jan 2011 14:54:50 -0600 (CST) (envelope-from tundra@tundraware.com) Message-ID: <4D2F6696.6030403@tundraware.com> Date: Thu, 13 Jan 2011 14:54:46 -0600 From: Tim Daneliuk Organization: TundraWare Inc. User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: FreeBSD Mailing List References: <201101132056.p0DKu3tq027950@mail.r-bonomi.com> In-Reply-To: <201101132056.p0DKu3tq027950@mail.r-bonomi.com> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (ozzie.tundraware.com [75.145.138.73]); Thu, 13 Jan 2011 14:54:50 -0600 (CST) X-TundraWare-MailScanner-Information: Please contact the ISP for more information X-TundraWare-MailScanner-ID: p0DKsn5e074746 X-TundraWare-MailScanner: Found to be clean X-TundraWare-MailScanner-From: tundra@tundraware.com X-Spam-Status: No Subject: Re: Simple command to reset / clear all logs? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jan 2011 20:54:58 -0000 On 1/13/2011 2:56 PM, Robert Bonomi wrote: >> Date: Wed, 12 Jan 2011 20:58:04 +0100 >> From: Polytropon >> Subject: Re: Simple command to reset / clear all logs? >> >> On Wed, 12 Jan 2011 20:50:04 +0100, Redd Vinylene >> wrote: >>> Will the logs automatically create themselves? >> >> Usually not, but it depends on the logging mechanism. If a program >> continuously re-opens the file (after closing it) in APPEND mode, it >> should be created if non-existent. But if the program keeps the file open >> and just writes to it, it can cause trouble. Good programs check the >> return code of the writing operation and signal an error. Bad programs >> don't do that, they just keep writing to nowhere. :-) > > _syslogd_ *explicitly* does -not- _create_ any log files. it is documented > in the manpages that it behaves that way. Whether or not this is a "good > idea" is debatable, but it does allow you to suppress some logging w/o having > to edit the syslog.conf file and/or re-start syslogd. > >>> I mean, I picture I have to manually touch a lotta them in order to >>> avoid "cannot find" error messages? > > Syslog does -not- give any such messages, it just doesn't write the message > anywere. It's worth noting that if you delete an open file, any programs with open write handles to the file can still write to it and thus chew up disk space. So ... you can't just reach in and delete log files unless you're sure nothing has them open. -- ------------------------------------------------------------------------ Tim Daneliuk tundra@tundraware.com