You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by 陈加俊 <cj...@gmail.com> on 2011/02/16 08:51:59 UTC

How to limit the number of logs that producted by DailyRollingFileAppender

How to limit the number of logs that producted by DailyRollingFileAppender ?


I find the logs are exceeding  disk apace limit.

Re: How to limit the number of logs that producted by DailyRollingFileAppender

Posted by 陈加俊 <cj...@gmail.com>.
I uncomment MaxBackupIndex and restart regionserver but warn message as
follows:

starting regionserver, logging to
/app/cloud/hbase/bin/../logs/hbase-uuwatch-regionserver-gentoo_uuwatch_183.out
log4j:WARN No such property [maxBackupIndex] in
org.apache.log4j.DailyRollingFileAppender.


On Thu, Feb 17, 2011 at 9:30 AM, Tatsuya Kawano <ta...@gmail.com>wrote:

>
> 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>
> http://wiki.apache.org/logging-log4j/DailyRollingFileAppender
>
> "I've change the DailyRollingFileAppender to support the MaxBackupIndex<http://wiki.apache.org/logging-log4j/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, 陈加俊 < <cj...@gmail.com>
> 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 < <ta...@gmail.com>
> 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> <http://twitter.com/#!/tatsuya6502>
>> http://twitter.com/#!/tatsuya6502
>>
>>
>>
>>
>>
>>
>>
>
>
> --
> Thanks & Best regards
> jiajun
>
>


-- 
Thanks & Best regards
jiajun

Re: How to limit the number of logs that producted by DailyRollingFileAppender

Posted by Tatsuya Kawano <ta...@gmail.com>.
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, 陈加俊 <cj...@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 <ta...@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
> 


Re: How to limit the number of logs that producted by DailyRollingFileAppender

Posted by 陈加俊 <cj...@gmail.com>.
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 <ta...@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

Re: How to limit the number of logs that producted by DailyRollingFileAppender

Posted by Tatsuya Kawano <ta...@gmail.com>.
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