Date: Thu, 13 Jan 2011 14:56:03 -0600 (CST) From: Robert Bonomi <bonomi@mail.r-bonomi.com> To: freebsd-questions@freebsd.org Subject: Re: Simple command to reset / clear all logs? Message-ID: <201101132056.p0DKu3tq027950@mail.r-bonomi.com> In-Reply-To: <20110112205804.3ec42ec8.freebsd@edvax.de>
next in thread | previous in thread | raw e-mail | index | archive | help
> Date: Wed, 12 Jan 2011 20:58:04 +0100 > From: Polytropon <freebsd@edvax.de> > Subject: Re: Simple command to reset / clear all logs? > > On Wed, 12 Jan 2011 20:50:04 +0100, Redd Vinylene > <reddvinylene@gmail.com> 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101132056.p0DKu3tq027950>