You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Michiel Meeuwissen <Mi...@omroep.nl> on 2001/04/23 09:53:00 UTC

version 1.1 beta, 'backwards compatible'?

I used version 1.0.4 of log4j, by extending Category. This does not
work with version 1.1.b5 because the previously accessible variable
'disabled' is not accessible anymore in my extended class. It is now a
member of 'hierarchy', and I suppose only accessible by calling
'isDisabled()' on 'hierarchy' (is that good? Will this extra function
call do no harm?)

Is there a backward compatibly way to extend category with new priorities?

I had:
 public final void trace(Object message) {
        // disable is defined in Category
        if (disable >=  Log4jPriority.TRACE_INT) {
            return;
        }
        if (Log4jPriority.TRACE.isGreaterOrEqual(this.getChainedPriority()))
            //callAppenders(new LoggingEvent(classname, this, Log4jPriority.TRACE, message, null));
            forcedLog(classname, Log4jPriority.TRACE, message, null);
    } 

and I think it must become:
  public final void trace(Object message) {
        // disable is defined in Category
        if (hierarchy.isDisabled(Log4jPriority.TRACE_INT)) {
            return;
        } 
..


Michiel


-- 
Michiel Meeuwissen - NOS internet 
Mediacentrum kamer 203 - tel. +31 (0)35 6773065
http://www.mmbase.org  
http://www.purl.org/NET/mihxil/


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org