hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tatsuya Kawano <tatsuya6...@gmail.com>
Subject Re: How to limit the number of logs that producted by DailyRollingFileAppender
Date Thu, 17 Feb 2011 01:30:46 GMT

Did you try MaxBackupIndex? Didn't it work?

I found this in Log4j wiki, but I don't know if this class has been merged into log4j trunk.


http://wiki.apache.org/logging-log4j/DailyRollingFileAppender

"I've change the DailyRollingFileAppender to support the MaxBackupIndex, this is the class
to add to the jar that contains the log4j library:"

Since this is a log4j question, you could get better answer if you ask your question at log4j-user
mailing list.

Thanks, 

--
Tatsuya Kawano
Tokyo, Japan


On Feb 17, 2011, at 10:17 AM, 陈加俊 <cjjvictory@gmail.com> wrote:

> I want to limit the number of log files for a DailyRollingFileAppender. I search for
a parameter like maxBackupIndex (in RollingFileAppender) but can not find one. Is there really
no way to limit the number of log-Files?
> 
> What is the strategy to ensure that the (number) of log files do not "overrun". Delete
them manually?
> 
> On Wed, Feb 16, 2011 at 5:56 PM, Tatsuya Kawano <tatsuya6502@gmail.com> wrote:
> Hi,
> 
> On 02/16/2011, at 4:51 PM, 陈加俊 wrote:
> > How to limit the number of logs that producted by DailyRollingFileAppender ?
> >
> > I find the logs are exceeding  disk apace limit.
> 
> 
> If you're using "log4j.properties" coming with HBase, uncomment MaxBackupIndex property
ant change its value.
> 
> # 30-day backup
> #log4j.appender.DRFA.MaxBackupIndex=30
> 
> 
> Also, if it's for production environment, make sure you change the logging level to INFO,
so you can reduce the amount of the logs.
> 
> log4j.logger.org.apache.hadoop.hbase=INFO
> 
> 
> Thanks,
> 
> --
> Tatsuya Kawano (Mr.)
> Tokyo, Japan
> 
> http://twitter.com/#!/tatsuya6502
> 
> 
> 
> 
> 
> 
> 
> 
> 
> -- 
> Thanks & Best regards
> jiajun
> 


Mime
  • Unnamed multipart/alternative (inline, 7-Bit, 0 bytes)
View raw message