Mailinglist Archive: opensuse (3337 mails)

< Previous Next >
Re: [SLE] logrotate question
  • From: Patrick Shanahan <ptilopteri@xxxxxxxxx>
  • Date: Fri, 28 Apr 2006 19:10:44 -0400
  • Message-id: <20060428231044.GA16632@xxxxxxxxxxxxxxx>
* Till Wimmer <suse-e@xxxxxxxxxxxx> [04-28-06 00:11]:
> I want my apache log files to be rotated when they're bigger then 50M
> and ONLY when they're bigger.
>
> But my /etc/logrotate.conf says:
> # rotate log files weekly
> weekly
>
> I added a file /etc/logrotate.d/apache:
> /var/log/apache2/*.log {
> size=20M
> ...
> }
>
> What's gonna happen? Are the files rotated even when they're smaller
> than 50M?

yes, you have size=20M

My config: size=+10M

> Do i have to change the global options and thus all other
> configurations in /etc/logrotate.d?

no, but.... (suggested, not tested)

/var/log/apache2/*._log {
compress
dateext
size=+50M
notifempty
missingok
postrotate
/etc/init.d/apache2 reload
endscript
}

man logrotate

--
Patrick Shanahan Registered Linux User #207535
http://wahoo.no-ip.org @ http://counter.li.org
HOG # US1244711 Photo Album: http://wahoo.no-ip.org/gallery2

< Previous Next >
Follow Ups
References