You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jay Dickon Glanville <di...@gmail.com> on 2007/04/16 20:11:47 UTC

rotatable access logs?

Hello all,

I'm currently using the Access Log Valve as part of my Tomcat 5.5
installation to track what pages people are going to most frequently.
However, these logs are ever growing, taking up more and more HD
space.

What I'd like to do is configure the valve so that only the last 30
days of information are kept.

Is there a way to tell the valve that it should rotate the log files,
only keeping the last 30 copies of the logs?

Thanks.

-- 
Jay Dickon Glanville

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: rotatable access logs?

Posted by Tim Funk <fu...@joedog.org>.
There is no option for keeping the last 30 days.

instead add this to cron:
find $CATALINA_HOME/logs \
   -name "localhost_access_log*" \
   -mtime +30 | xargs rm -f


-Tim

Jay Dickon Glanville wrote:
> Hello all,
> 
> I'm currently using the Access Log Valve as part of my Tomcat 5.5
> installation to track what pages people are going to most frequently.
> However, these logs are ever growing, taking up more and more HD
> space.
> 
> What I'd like to do is configure the valve so that only the last 30
> days of information are kept.
> 
> Is there a way to tell the valve that it should rotate the log files,
> only keeping the last 30 copies of the logs?
> 
> Thanks.
> 


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org