On Wed, Jun 11, 2014 at 2:00 AM, N, Ravikiran <ravikira...@hp.com> wrote:

> Tomcat uses log4j for its logging.


This is not 100% correct.  By default Tomcat does not use Log4j, it uses
JULI [1] (for it's internal logging).  It can use Log4j if you configure it
to though [2].

Hence you can specify how logger should behave using the configuration file
> used by log4j. You can specify by adding below in your tomcat config
> TOMCAT_OPTS="-Dlog4j.configuration=/my/config/log4j.properties"
>
> -----Original Message-----
> From: Akash Jain [mailto:akash.delh...@gmail.com]
> Sent: Wednesday, June 11, 2014 3:45 AM
> To: Tomcat Users List
> Subject: Size Based Rolling
>
> HI,
>
> How can we make catalina.out


By default, catalina.out is not rotated.  It can be done though.  See here
for more info.

  http://wiki.apache.org/tomcat/FAQ/Logging#Q6
  http://wiki.apache.org/tomcat/FAQ/Logging#Q10


> and access logs ( AccessLogsValve) roll log based on size instead of daily
> rolling ?


I don't know if this is going to be possible, access logs are not written
through the logging system.

  http://tomcat.apache.org/tomcat-7.0-doc/logging.html#Access_logging

As far as I know, the valve that comes with Tomcat [3] only support
rotating by date.  I suppose you could use a different valve or write your
own (perhaps subclassing the AccesLogValve), if rotating by size is that
important.

Dan

[1] -
http://tomcat.apache.org/tomcat-7.0-doc/logging.html#Using_java.util.logging_(default)
[2] - http://tomcat.apache.org/tomcat-7.0-doc/logging.html#Using_Log4j
[3] -
http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html#Access_Logging

Reply via email to