Extending Logger

2010-10-21 Thread Mohan.Radhakrishnan
The complete Log4J manual discourages us from extending Logger but we use the recommended pattern then 'repository' and 'getEffectiveLevel()' are inaccessible because they are protected in Category. public void trace(Object message) { if (repository.isDisabled(Level.TRACE_INT)) {

RE: [SCL-4] Is it possible to configure different log levels for the same appender based on what logger it is coming from?

2010-10-21 Thread Bender Heri
One possibility I see: Write an own Filter which is attached to the root logger's Apender and filter out the messages which you do not want. Heri -Original Message- From: Adam Creeger [mailto:adamcree...@gmail.com] Sent: Wednesday, October 20, 2010 11:23 PM To:

Extending extra RollingFileAppender

2010-10-21 Thread Kenneth.Lam
Hi, I am looking to modify a small part of the write behavior for org.apache.log4j.rolling.RollingFileAppender from the extra companion jar. However, the class is declared as final. Is there any particular reason why this was done? Would removing the final keyword and extending the class my

Re: Extending extra RollingFileAppender

2010-10-21 Thread Curt Arnold
The motivation for making the class final is that it was designed to be extended via the TriggeringPolicy and RollingPolicy classes. Joshua Bloch's design pattern of design for inheritance or prevent it. If you can accomplish your goal by providing a custom TriggeringPolicy or RollingPolicy