Return-Path: Delivered-To: apmail-xml-axis-dev-archive@xml.apache.org Received: (qmail 4081 invoked by uid 500); 29 Oct 2002 16:52:08 -0000 Mailing-List: contact axis-dev-help@xml.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@xml.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-dev@xml.apache.org Received: (qmail 4072 invoked by uid 500); 29 Oct 2002 16:52:08 -0000 Delivered-To: apmail-xml-axis-wsif-cvs@apache.org Date: 29 Oct 2002 16:52:08 -0000 Message-ID: <20021029165208.74635.qmail@icarus.apache.org> From: whitlock@apache.org To: xml-axis-wsif-cvs@apache.org Subject: cvs commit: xml-axis-wsif/java/src/org/apache/wsif/logging Trc.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N whitlock 2002/10/29 08:52:08 Modified: java/src/org/apache/wsif/logging Trc.java Log: Enable trace to trace itself Revision Changes Path 1.8 +13 -0 xml-axis-wsif/java/src/org/apache/wsif/logging/Trc.java Index: Trc.java =================================================================== RCS file: /home/cvs/xml-axis-wsif/java/src/org/apache/wsif/logging/Trc.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- Trc.java 18 Sep 2002 15:38:19 -0000 1.7 +++ Trc.java 29 Oct 2002 16:52:07 -0000 1.8 @@ -98,6 +98,12 @@ private static Log log = LogFactory.getLog(wsifPackageName+".*"); public static boolean ON = log.isDebugEnabled(); + private static Log traceLog = LogFactory.getLog(wsifPackageName+".logging.*"); + /** + * traceTrace means "is trace itself being traced?" + */ + private static boolean traceTrace = traceLog.isDebugEnabled(); + private final static String ENTRY = "ENTRY"; private final static String EXIT = "EXIT "; private final static String EXCEPTION = "EXCEPTION"; @@ -1114,6 +1120,7 @@ PrintWriter pw = new PrintWriter(sw); e.printStackTrace(pw); String stack = sw.getBuffer().toString(); + if (traceTrace) traceLog.debug("TRACE stack="+stack); // The next while loop tries to find the method that called // Trc. The method name will have (...parmeters...) after it @@ -1123,6 +1130,8 @@ String tok = null; while (st1.hasMoreTokens()) { tok = st1.nextToken(); + if (traceTrace) traceLog.debug("TRACE token="+tok); + if (tok.indexOf("(") == -1) continue; @@ -1134,6 +1143,7 @@ if (foundWsifLogging) break; } + if (traceTrace) traceLog.debug("TRACE broken out token="+tok); // Indent the method name by the number of WSIF calls // higher up the stack. This improves readability. There @@ -1151,6 +1161,7 @@ int idx = tok.indexOf("("); if (idx != -1) tok = tok.substring(0, idx); + if (traceTrace) traceLog.debug("TRACE token="+tok); // Now strip off the WSIF package name off the front of // the class name. All WSIF class names are unique, so @@ -1165,12 +1176,14 @@ while (st2.hasMoreTokens()) { previous = result; result = st2.nextToken(); + if (traceTrace) traceLog.debug("TRACE result="+result); } if (previous != null) result = previous + "." + result; } else result = tok; + if (traceTrace) traceLog.debug("TRACE appending result="+result); buff.append(result); }