tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Goo Sam Kong <skgo...@gmail.com>
Subject Re: Logging Requirement in Tomcat 5.5.16
Date Wed, 21 Apr 2010 08:32:38 GMT
I want catalina.out to be rotate daily but Tomcat give me extra files
(catalina.out.1.gz, catalina.out.2.gz...catalina.out.30.gz). I don't those
extra files. Any chance to disable that?

On 21 April 2010 16:26, Pid <pid@pidster.com> wrote:

> On 21/04/2010 09:07, Goo Sam Kong wrote:
> > Hi,
> >
> > I am using Log4j logging in Tomcat 5.5.16 with JDK 1.5.0 update 7 on
> RedHat
> > Linux server.
> >
> > I followed the instructions on
> > http://tomcat.apache.org/tomcat-5.5-doc/logging.html to copy the
> > commons-logging-1.0.4.jar and log4j.jar into $CATALINA_HOME/common/lib
> > directory.
> >
> > and created log4j.properties in $CATALINA_HOME/common/classes directory
> as
> > below:
> >
> > log4j.rootLogger=info, CATALINA
> > log4j.appender.CATALINA=org.apache.log4j.DailyRollingFileAppender
> > log4j.appender.CATALINA.DatePattern='.'yyyy-MM-dd
> > log4j.appender.CATALINA.File=${catalina.home}/logs/catalina.out
> > log4j.appender.CATALINA.threshold=info
> > log4j.appender.CATALINA.layout=org.apache.log4j.PatternLayout
> > log4j.appender.CATALINA.layout.ConversionPattern=%d:%p %c{2} - %m%n
> >
> > After couple of days, I saw some catalina.out files suffix with ".x.gz",
> > where x is number range from 1 to 30. May I know to get rid of these
> files?
> >
> > I only want log4j to handle the file rotation as configured in
> > log4j.properties.
>
> You've configured a DailyRollingFileAppender with DatePattern
> DatePattern set to ".yyyy-MM-dd" so the log files are being rotated daily.
>
> What were you intending it to do?
>
>
> p
>
>
>
> > Thank you.
> >
> > Regards,
> > SamKong Goo
> >
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message