Date: Thu, 7 Oct 2010 13:48:17 -0700 From: David Brodbeck <gull@gull.us> To: Lowell Gilbert <freebsd-questions-local@be-well.ilk.org> Cc: Joe Auty <joe@netmusician.org>, freebsd-questions@freebsd.org Subject: Re: newsyslog.conf and Apache log files Message-ID: <AANLkTimtOEMvmcFg2-Sm=GC186BNWS_dGD49SrYZaSsi@mail.gmail.com> In-Reply-To: <4439sh507l.fsf@be-well.ilk.org> References: <4CAE02AB.1090009@netmusician.org> <4439sh507l.fsf@be-well.ilk.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Oct 7, 2010 at 11:25 AM, Lowell Gilbert <freebsd-questions-local@be-well.ilk.org> wrote: > Joe Auty <joe@netmusician.org> writes: > >> Hello, >> >> I have the following entry for dealing with my Apache log files: >> >> /var/log/httpd/* =A0 =A0 =A0 =A0 =A0 =A0 644 =A02 =A0 =A0 * =A0$M1D0 GBJ >> /var/run/httpd.pid 30 >> >> >> Unfortunately, this has created these big long log files such as the >> following: >> >> httpderror_log.2.bz2.2.bz2.2.bz2.1.bz2.1.bz2.1.bz2.0.bz2 >> >> How can I prevent these dumb log file names from being created? > > Don't use wildcards in newsyslog.conf. > > What's happening is "httperror_log.2.bz2" gets rotated into > "httperror_log.2.baz2.1.bz2", because it matches the filename > glob you specified. One alternative might be to use newsyslog's -a option to put the archived logs in a separate directory, where the glob won't find them. Unfortunately there doesn't seem to be a way to define this on a per-file or per-directory basis, so it would apply to *all* your logs.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTimtOEMvmcFg2-Sm=GC186BNWS_dGD49SrYZaSsi>