You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by vg...@apache.org on 2002/06/27 00:25:56 UTC

cvs commit: xml-cocoon2/src/java/org/apache/cocoon/util/log CocoonLogFormatter.java

vgritsenko    2002/06/26 15:25:55

  Modified:    src/java/org/apache/cocoon/util/log Tag: cocoon_2_0_3_branch
                        CocoonLogFormatter.java
  Log:
  Make CocoonLogFormatter play with new Avalon logging abstraction
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.5.2.1   +14 -4     xml-cocoon2/src/java/org/apache/cocoon/util/log/CocoonLogFormatter.java
  
  Index: CocoonLogFormatter.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/util/log/CocoonLogFormatter.java,v
  retrieving revision 1.5
  retrieving revision 1.5.2.1
  diff -u -r1.5 -r1.5.2.1
  --- CocoonLogFormatter.java	22 Feb 2002 07:03:58 -0000	1.5
  +++ CocoonLogFormatter.java	26 Jun 2002 22:25:55 -0000	1.5.2.1
  @@ -112,7 +112,16 @@
           }
       }
   
  -    /** The class that we will search for in the call stack */
  +    /**
  +     * The class that we will search for in the call stack
  +     * (Avalon logging abstraction)
  +     */
  +    private Class logkitClass = org.apache.avalon.framework.logger.LogKitLogger.class;
  +
  +    /**
  +     * The class that we will search for in the call stack
  +     * (LogKit logger)
  +     */
       private Class loggerClass = org.apache.log.Logger.class;
   
       private CallStack callStack = new CallStack();
  @@ -159,8 +168,9 @@
   
           // Traverse the call stack in reverse order until we find a Logger
           for (int i = stack.length-1; i >= 0; i--) {
  -            if (this.loggerClass.isAssignableFrom(stack[i])) {
  -
  +            if (this.logkitClass.isAssignableFrom(stack[i]) ||
  +                this.loggerClass.isAssignableFrom(stack[i]))
  +            {
                   // Found : the caller is the previous stack element
                   String className = stack[i+1].getName();
   
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org