You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Julie christiana <ju...@yahoo.com> on 2003/10/10 06:11:50 UTC

[NewBie]Tomcat logs

Hi,
 
We have tomcat 4.1.24 installed. Thanks to tomcat documentation and email archives, we understood that tomcat logs will be rotated every day.
 
Would like to know if there we can configure the following for tomcat logs :
 
1) Keep a maximum of log files in tomcat/logs directory for AccessLog and other logs configured.
2) Keep a consolidated log file for the webserver and configure the backups and max. size for it.
 
Any help on this would be appreciated.
 
Thanks in Advance,
Julie Chritiana

 


---------------------------------
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search

Re: [NewBie]Tomcat logs

Posted by Tim Funk <fu...@joedog.org>.
See the javadocs for AccessLogValve (prefereably your local version since the 
site is a version out of date. Any setXXX(stuff) method can be set declared 
in the AccessLogValve decalration. For example, there is a property called 
rotatable as indicated by setRotatable(boolean). This can be set in the vavle 
by this:

<Valve className="org.apache.catalina.valves.AccessLogValve"
  directory="logs"  prefix="localhost_access_log." suffix=".txt"
rotatable='false' pattern="common" resolveHosts="false"/>

You can declare as many Valves as you want. I recommend copy/paste to get as 
many declarations as possible on a test tomcat instance so you can play with 
the different property permutations.

-Tim


Julie christiana wrote:

> Sorry to bother you all with so many questions,
>  
> but could you please send me a sample server.xml which achieves the same.
> Any documentation for the same would also be useful.
>  
> Thanks,
> Julie Chritiana
> 
> Tim Funk <fu...@joedog.org> wrote:
> The AccessLogValve does not have the ability to perform the deletion of old 
> files.
> 
> You can have multiple AccessLogValves at the same time. For example: one 
> writing to a single non-rotating log file and the other rotating nightly.
> 
> -Tim
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: [NewBie]Tomcat logs

Posted by Julie christiana <ju...@yahoo.com>.
Sorry to bother you all with so many questions,
 
but could you please send me a sample server.xml which achieves the same.
Any documentation for the same would also be useful.
 
Thanks,
Julie Chritiana

Tim Funk <fu...@joedog.org> wrote:
The AccessLogValve does not have the ability to perform the deletion of old 
files.

You can have multiple AccessLogValves at the same time. For example: one 
writing to a single non-rotating log file and the other rotating nightly.

-Tim

Julie christiana wrote:
> Is it possible to do this configuration in webserver itself ... I mean in server.xml ?
> 
> Thanks for the help,
> Julie Christiana
> 
> Tim Funk wrote:
> Both can be done by simple exercises in shell scripting.
> 
> -Tim
> 
> Julie christiana wrote:
> 
>>Hi,
>>
>>We have tomcat 4.1.24 installed. Thanks to tomcat documentation and email archives, we understood that tomcat logs will be rotated every day.
>>
>>Would like to know if there we can configure the following for tomcat logs :
>>
>>1) Keep a maximum of log files in tomcat/logs directory for AccessLog and other logs configured.
>>2) Keep a consolidated log file for the webserver and configure the backups and max. size for it.
>>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search

Re: [NewBie]Tomcat logs

Posted by Tim Funk <fu...@joedog.org>.
The AccessLogValve does not have the ability to perform the deletion of old 
files.

You can have multiple AccessLogValves at the same time. For example: one 
writing to a single non-rotating log file and the other rotating nightly.

-Tim

Julie christiana wrote:
> Is it possible to do this configuration in webserver itself ... I mean in server.xml ?
>  
> Thanks for the help,
> Julie Christiana
> 
> Tim Funk <fu...@joedog.org> wrote:
> Both can be done by simple exercises in shell scripting.
> 
> -Tim
> 
> Julie christiana wrote:
> 
>>Hi,
>>
>>We have tomcat 4.1.24 installed. Thanks to tomcat documentation and email archives, we understood that tomcat logs will be rotated every day.
>>
>>Would like to know if there we can configure the following for tomcat logs :
>>
>>1) Keep a maximum of log files in tomcat/logs directory for AccessLog and other logs configured.
>>2) Keep a consolidated log file for the webserver and configure the backups and max. size for it.
>>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: [NewBie]Tomcat logs

Posted by Julie christiana <ju...@yahoo.com>.
Is it possible to do this configuration in webserver itself ... I mean in server.xml ?
 
Thanks for the help,
Julie Christiana

Tim Funk <fu...@joedog.org> wrote:
Both can be done by simple exercises in shell scripting.

-Tim

Julie christiana wrote:
> Hi,
> 
> We have tomcat 4.1.24 installed. Thanks to tomcat documentation and email archives, we understood that tomcat logs will be rotated every day.
> 
> Would like to know if there we can configure the following for tomcat logs :
> 
> 1) Keep a maximum of log files in tomcat/logs directory for AccessLog and other logs configured.
> 2) Keep a consolidated log file for the webserver and configure the backups and max. size for it.
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search

Re: [NewBie]Tomcat logs

Posted by Tim Funk <fu...@joedog.org>.
Both can be done by simple exercises in shell scripting.

-Tim

Julie christiana wrote:
> Hi,
>  
> We have tomcat 4.1.24 installed. Thanks to tomcat documentation and email archives, we understood that tomcat logs will be rotated every day.
>  
> Would like to know if there we can configure the following for tomcat logs :
>  
> 1) Keep a maximum of log files in tomcat/logs directory for AccessLog and other logs configured.
> 2) Keep a consolidated log file for the webserver and configure the backups and max. size for it.
>  


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org