amyroh 2004/09/17 11:32:14 Modified: modules/cluster/src/share/org/apache/catalina/cluster/io XByteBuffer.java modules/cluster/src/share/org/apache/catalina/cluster/tcp SimpleTcpCluster.java tester/src/tester/org/apache/tester TestClient.java webapps/admin/WEB-INF/classes/org/apache/webapp/admin CommitChangesAction.java Log: More logging changes - let me know if you see any problems with'em. Revision Changes Path 1.10 +2 -2 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/io/XByteBuffer.java Index: XByteBuffer.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/io/XByteBuffer.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- XByteBuffer.java 1 Jul 2004 09:44:27 -0000 1.9 +++ XByteBuffer.java 17 Sep 2004 18:32:14 -0000 1.10 @@ -381,7 +381,7 @@ log.info("Nr of packages="+s); while ( s > 0 ) { d = b.extractPackage(true); - System.out.print("Package d1="); + log.info("Package d1="); printBuf(d); s--; }//while 1.49 +3 -3 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/SimpleTcpCluster.java Index: SimpleTcpCluster.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/SimpleTcpCluster.java,v retrieving revision 1.48 retrieving revision 1.49 diff -u -r1.48 -r1.49 --- SimpleTcpCluster.java 5 Sep 2004 22:00:52 -0000 1.48 +++ SimpleTcpCluster.java 17 Sep 2004 18:32:14 -0000 1.49 @@ -270,8 +270,8 @@ public synchronized Manager createManager(String name) { - log.debug("Creating ClusterManager for context "+name + " using class "+getManagerClassName()); - System.out.println("\n\n\n\nCreating ClusterManager for context "+name + " using class "+getManagerClassName()+"\n\n\n\n"); + if (log.isDebugEnabled()) + log.debug("Creating ClusterManager for context "+name + " using class "+getManagerClassName()); ClusterManager manager = null; try { manager = (ClusterManager)getClass().getClassLoader().loadClass(getManagerClassName()).newInstance(); 1.3 +19 -19 jakarta-tomcat-catalina/tester/src/tester/org/apache/tester/TestClient.java Index: TestClient.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/tester/src/tester/org/apache/tester/TestClient.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- TestClient.java 27 Feb 2004 14:58:57 -0000 1.2 +++ TestClient.java 17 Sep 2004 18:32:14 -0000 1.3 @@ -354,7 +354,7 @@ try { readGolden(); } catch (IOException e) { - System.out.println("FAIL: readGolden(" + golden + ")"); + log("FAIL: readGolden(" + golden + ")"); e.printStackTrace(System.out); } if ((protocol == null) || (protocol.length() == 0)) @@ -378,7 +378,7 @@ // Construct a summary of the request we will be sending String summary = "[" + method + " " + request + "]"; if (debug >= 1) - System.out.println("RQST: " + summary); + log("RQST: " + summary); boolean success = true; String result = null; Throwable throwable = null; @@ -396,7 +396,7 @@ conn.setRequestProperty("Content-Length", "" + inContent.length()); if (debug >= 1) - System.out.println("INPH: Content-Length: " + + log("INPH: Content-Length: " + inContent.length()); } else { conn.setDoOutput(false); @@ -407,12 +407,12 @@ conn.setRequestProperty("Cookie", "JSESSIONID=" + sessionId); if (debug >= 1) - System.out.println("INPH: Cookie: JSESSIONID=" + + log("INPH: Cookie: JSESSIONID=" + sessionId); } if (this.redirect && (debug >= 1)) - System.out.println("FLAG: setInstanceFollowRedirects(" + + log("FLAG: setInstanceFollowRedirects(" + this.redirect + ")"); conn.setInstanceFollowRedirects(this.redirect); conn.setRequestMethod(method); @@ -435,7 +435,7 @@ String value = header.substring(colon + 1).trim(); conn.setRequestProperty(name, value); if (debug >= 1) - System.out.println("INPH: " + name + ": " + value); + log("INPH: " + name + ": " + value); } } @@ -443,7 +443,7 @@ conn.connect(); if (inContent != null) { if (debug >= 1) - System.out.println("INPD: " + inContent); + log("INPD: " + inContent); OutputStream os = conn.getOutputStream(); for (int i = 0; i < inContent.length(); i++) os.write(inContent.charAt(i)); @@ -471,7 +471,7 @@ // Dump out the response stuff if (debug >= 1) - System.out.println("RESP: " + conn.getResponseCode() + " " + + log("RESP: " + conn.getResponseCode() + " " + conn.getResponseMessage()); for (int i = 1; i < 1000; i++) { String name = conn.getHeaderFieldKey(i); @@ -479,15 +479,15 @@ if ((name == null) || (value == null)) break; if (debug >= 1) - System.out.println("HEAD: " + name + ": " + value); + log("HEAD: " + name + ": " + value); save(name, value); if ("Set-Cookie".equals(name)) parseSession(value); } if (debug >= 1) { - System.out.println("DATA: " + outData); + log.println("DATA: " + outData); if (outText.length() > 2) - System.out.println("TEXT: " + outText); + log.println("TEXT: " + outText); } // Validate the response against our criteria @@ -546,9 +546,9 @@ // Log the results of executing this request if (success) - System.out.println("OK " + summary); + log.println("OK " + summary); else { - System.out.println("FAIL " + summary + " " + result); + log.println("FAIL " + summary + " " + result); if (throwable != null) throwable.printStackTrace(System.out); } @@ -567,7 +567,7 @@ String command = method + " " + request + " " + protocol; String summary = "[" + command + "]"; if (debug >= 1) - System.out.println("RQST: " + summary); + log("RQST: " + summary); boolean success = true; String result = null; Socket socket = null; @@ -590,7 +590,7 @@ pw.print(command + "\r\n"); if (inContent != null) { if (debug >= 1) - System.out.println("INPH: " + "Content-Length: " + + log("INPH: " + "Content-Length: " + inContent.length()); pw.print("Content-Length: " + inContent.length() + "\r\n"); } @@ -599,7 +599,7 @@ if (joinSession && (sessionId != null)) { pw.println("Cookie: JSESSIONID=" + sessionId); if (debug >= 1) - System.out.println("INPH: Cookie: JSESSIONID=" + + log("INPH: Cookie: JSESSIONID=" + sessionId); } @@ -622,7 +622,7 @@ String name = header.substring(0, colon).trim(); String value = header.substring(colon + 1).trim(); if (debug >= 1) - System.out.println("INPH: " + name + ": " + value); + log("INPH: " + name + ": " + value); pw.print(name + ": " + value + "\r\n"); } } @@ -631,7 +631,7 @@ // Send our content (if any) if (inContent != null) { if (debug >= 1) - System.out.println("INPD: " + inContent); + log("INPD: " + inContent); for (int i = 0; i < inContent.length(); i++) pw.print(inContent.charAt(i)); } 1.5 +2 -2 jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/CommitChangesAction.java Index: CommitChangesAction.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/CommitChangesAction.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- CommitChangesAction.java 10 Jul 2004 06:56:14 -0000 1.4 +++ CommitChangesAction.java 17 Sep 2004 18:32:14 -0000 1.5 @@ -117,7 +117,7 @@ } - System.out.println("Debugging -- changes saved to conf/server.xml"); + getServlet().log("Debugging -- changes saved to conf/server.xml"); // Forward control back to the banner return (mapping.findForward("Banner"));
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]