vgritsenko 2002/06/26 15:25:56 Modified: src/java/org/apache/cocoon/util/log CocoonLogFormatter.java Log: Make CocoonLogFormatter play with new Avalon logging abstraction Revision Changes Path 1.6 +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.6 diff -u -r1.5 -r1.6 --- CocoonLogFormatter.java 22 Feb 2002 07:03:58 -0000 1.5 +++ CocoonLogFormatter.java 26 Jun 2002 22:25:56 -0000 1.6 @@ -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: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]