Turn off logfile rotation

This is a discussion on Turn off logfile rotation within the Linux Web Servers forums, part of the Web Server and Related Forums category; Hi, I recently set up an apache webserver. I noticed that fairly regularly (every two days or so) all of ...


Go Back   Usenet Forums > Web Server and Related Forums > Linux Web Servers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-13-2003
Kim
 
Posts: n/a
Default Turn off logfile rotation

Hi, I recently set up an apache webserver. I noticed that fairly
regularly (every two days or so) all of my apache logs (error_log,
access_log, etc) get renamed to error_log.1, access_log.1, etc. I
never enabled this feature as far as I know, and I'd really like to
turn it off. It's not renaming the files because they're too large, in
fact they were quite small (less than 3KB), so I find this behavior
annoying. I wouldn't mind file rotation if the files got to 100 MB or
so, but no sooner. Can someone shed some light on changing this file
rotation feature?
  #2 (permalink)  
Old 08-13-2003
Kim
 
Posts: n/a
Default Re: Turn off logfile rotation

> If your system is a different Linux distro, or a different OS, look
> elsewhere. 'man logrotate' may help.


I'm on RH 9.0. I added the following line to /etc/logrotate.d/httpd:

/var/log/httpd/*log {
missingok
notifempty
size=100M # this is my new line
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2>
/dev/null || true
endscript
}

However, I don't see what rule it was following previously to trigger
the rotation. There is the line "weekly" in my /etc/logrotate.conf, so
perhaps that was triggering it. Will the size=100M directive override
weekly rotation? (Which gets priority time or size?)
  #3 (permalink)  
Old 08-14-2003
Chris Morris
 
Posts: n/a
Default Re: Turn off logfile rotation

kimspiracy@yahoo.com (Kim) writes:
> However, I don't see what rule it was following previously to trigger
> the rotation. There is the line "weekly" in my /etc/logrotate.conf, so


Default value.

> perhaps that was triggering it. Will the size=100M directive override
> weekly rotation? (Which gets priority time or size?)


Not sure, the man page doesn't say. I suspect it will just override
the default value.

--
Chris
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 03:45 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0