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)) {
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:
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
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