You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by zliu1 <zl...@nd.edu> on 2002/02/08 16:03:15 UTC

rotate log file daily

Is there a way to rotate Apache log file daily always at the local time
23:59:59, and to name the old log file as access_log.YYYYMMDD? 

Thanks,
Zuwei


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: rotate log file daily

Posted by Kyle <ky...@ccidomain.com>.
I use cron to run a perl script that processes the log files for all of
my vhosts.  The script is based upon the apache doc:
http://httpd.apache.org/docs/logs.html#rotation
I have found that if you use a statistical viewer like webalizer (in my
case), that the apache docs on log rotation works much better than using
the piped logs.

-Kyle

zliu1 wrote:
> 
> Is there a way to rotate Apache log file daily always at the local time
> 23:59:59, and to name the old log file as access_log.YYYYMMDD?
> 
> Thanks,
> Zuwei
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: rotate log file daily

Posted by jon schatz <jo...@divisionbyzero.com>.
On Fri, 2002-02-08 at 07:03, zliu1 wrote:
> Is there a way to rotate Apache log file daily always at the local time
> 23:59:59, and to name the old log file as access_log.YYYYMMDD? 

you want logrotate(8), which is included with most linux distros and is
probably ported to other unices as well.

-jon

-- 
jon@divisionbyzero.com || www.divisionbyzero.com
gpg key: www.divisionbyzero.com/pubkey.asc
think i have a virus?: www.divisionbyzero.com/pgp.html
"You are in a twisty little maze of Sendmail rules, all confusing." 

Re: rotate log file daily

Posted by Vernon A Webb <Ve...@net-nation.com>.
Here's what I do and it gives me something like:

access_log.1013126400 for today, which I have no idea how 
that translates.

CustomLog "|rotatelogs /home/www/pub/logs/access_log 86400" 
common

If anyone knows how to make it come out as zliu1 suggests, 
I'd like to know that, better yet I would like to get it 
monthly and not daily.


-----Original Message-----
From: zliu1 <zl...@nd.edu>
To: users@httpd.apache.org
Date: Fri, 8 Feb 2002 10:03:15 -0500 (EST)
Subject: rotate log file daily

> 
> Is there a way to rotate Apache log file daily always at 
the local time
> 23:59:59, and to name the old log file as 
access_log.YYYYMMDD? 
> 
> Thanks,
> Zuwei
> 
> 
> ----------------------------------------------------------
-----------
> The official User-To-User support forum of the Apache 
HTTP Server
> Project.
> See <URL:http://httpd.apache.org/userslist.html> for more 
info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-
help@httpd.apache.org
> 



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org