tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pid <...@pidster.com>
Subject Re: Logging Requirement in Tomcat 5.5.16
Date Wed, 21 Apr 2010 09:00:35 GMT
On 21/04/2010 09:49, Pid wrote:
> On 21/04/2010 09:35, Goo Sam Kong wrote:
>> Oops, type too fast. 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 want those extra files. Any chance to disable that?
> 
> Sorry, my mistake, I misread your email.
> 
> Also:
> 
> http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/DailyRollingFileAppender.html
> 
> seems to say that DailyRollingFileAppender isn't a good choice.
> 
>> The extra files are generated by Tomcat by default? I do not specify
>> those file rotation anywhere.
> 
> Tomcat doesn't tar & gzip files by default.  How are you starting
> Tomcat, using a script like /etc/init.d/tomcat?

(I need a coffee.)

So, I'm not asking the right questions here.  To recap:

1. What log files *are* being generated?  Are you getting
catalina.2010-04-01.log, catalina.2010-04-02.log etc?

2. If so, are they in addition to the catalina.1.tar.gz type files?

3. How big are is the compressed tar.gz and and how big is the file when
it's unpacked?

4. Did you post the entire log4j.properties or are there other parts to
it?  E.g. Are there MaxBackupIndex and MaxFileSize settings?  If not,
try adding one set to -1 and 0.


p


>> On 21 April 2010 16:32, Goo Sam Kong <skgoo88@gmail.com
>> <mailto:skgoo88@gmail.com>> wrote:
>>
>>     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
>>     <mailto: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
View raw message