RE: why is web traffic being written to the rotated log file?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Yes, it is possible to use 'rotatelogs', however, logrotate has some
additional features such as compression and scripting which may be
useful in specific circumstances. For example, I am using the
'postrotate' option to process the rotated files of SQUID for the
billing purposes. Also 'logrotate' works when it is not possible to send
generated log to other program (like '|' syntax of Apache's log
directives) and all you have is the file which is constantly written by
the server. In general, the use of rotatelogs is preferential in the
situations where you may direct log to the stdin of other process and it
is not possible to tell the program which generates log to close and
reopen logfile.

Alexey Fadyushin.
Brainbench MVP for Linux
http://www.brainbench.com

> -----Original Message-----
> From: redhat-list-bounces@xxxxxxxxxx [mailto:redhat-list-
> bounces@xxxxxxxxxx] On Behalf Of Tom Callahan
> Sent: Thursday, March 30, 2006 1:38 AM
> To: General Red Hat Linux discussion list
> Subject: Re: why is web traffic being written to the rotated log file?
> 
> I would assume you could also use rotatelogs, which according to my
man
> page, is included with Apache HTTP Server...
> 
> usage in your httpd.conf would be as follows:
> CustomLog "|/path/to/bin/rotatelogs /path/to/logs/sitename-access_log
> 86400 -240" mediahouse
> ErrorLog "|/path/to/bin/rotatelogs /path/to/logs/sitename-error_log
> 86400 -240" mediahouse
> 
> That's what we do....rotates about every 24 hours
> < man rotatelogs > for more information
> 
> Tom Callahan
> TESSCO Technologies
> Desk: (410)-229-1361
> Cell: (410)-588-7605
> Email: callahant@xxxxxxxxxx
> 
> A real engineer only resorts to documentation when the keyboard dents
on
> the forehead get too noticeable.
> 
> 
> 
> Chris W. Parker wrote:
> 
> >A.Fadyushin@xxxxxxxxxxxx <mailto:A.Fadyushin@xxxxxxxxxxxx>
> >    on Wednesday, March 29, 2006 5:33 AM said:
> >
> >
> >
> >>The problem with logrotate and absence of execute permission for
/tmp
> >>may be solved by editind /etc/cron.daily/logrotate script and
setting
> >>therein the variable TMPDIR (via 'export TMPDIR=<somewhere>' before
> >>calling logrorate) to some directory with execute permission (for
> >>example /var/run). The logrotate will then use value of TMPDIR
instead
> >>of /tmp.
> >>
> >>
> >
> >Sounds good except look what I found in /etc/cron.daily/logrotate:
> >
> >#!/bin/sh
> >
> ># TMPDIR value other than /tmp needs to be set because of the noexec
> ># option on /tmp that is currently set.
> >export TMPDIR=/var/tmp/logrotate
> >
> >/usr/sbin/logrotate /etc/logrotate.conf
> >EXITVALUE=$?
> >if [ $EXITVALUE != 0 ]; then
> >    /usr/bin/logger -t logrotate "ALERT exited abnormally with
> >[$EXITVALUE]"
> >fi
> >exit 0
> >
> >
> >Any other ideas?
> >
> >
> >Thank you,
> >Chris.
> >
> >
> >
> 
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list



-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux