You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by am...@apache.org on 2004/09/17 23:57:55 UTC
cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/collections SimpleHashtable.java
amyroh 2004/09/17 14:57:55
Modified: jk/java/org/apache/ajp/tomcat4 JkServlet.java
jk/java/org/apache/ajp/tomcat4/config BaseJkConfig.java
jk/java/org/apache/jk/common Shm14.java WorkerDummy.java
util/java/org/apache/tomcat/util IntrospectionUtils.java
util/java/org/apache/tomcat/util/collections
SimpleHashtable.java
Log:
More logging changes - remove System.err to use commons logging.
Revision Changes Path
1.5 +1 -1 jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat4/JkServlet.java
Index: JkServlet.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat4/JkServlet.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- JkServlet.java 17 Sep 2004 18:34:18 -0000 1.4
+++ JkServlet.java 17 Sep 2004 21:57:54 -0000 1.5
@@ -88,7 +88,7 @@
private static final int dL=10;
private static void d(String s ) {
- System.err.println( "JkServlet: " + s );
+ log( "JkServlet: " + s );
}
1.7 +6 -5 jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat4/config/BaseJkConfig.java
Index: BaseJkConfig.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat4/config/BaseJkConfig.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- BaseJkConfig.java 31 Aug 2004 23:52:52 -0000 1.6
+++ BaseJkConfig.java 17 Sep 2004 21:57:54 -0000 1.7
@@ -91,6 +91,10 @@
@version $Revision$
*/
public class BaseJkConfig implements LifecycleListener {
+
+ private static org.apache.commons.logging.Log log=
+ org.apache.commons.logging.LogFactory.getLog( BaseJkConfig.class );
+
protected int debug=0;
protected File configHome = null;
protected File workersConfig = null;
@@ -132,7 +136,7 @@
try {
mod_jk = getWriter();
} catch(IOException iex) {
- log("Unable to open config file");
+ log.warn("Unable to open config file", iex);
return;
}
Lifecycle who = evt.getLifecycle();
@@ -478,8 +482,5 @@
return true;
return false;
- }
- protected void log(String msg) {
- System.err.println(msg);
}
}
1.4 +8 -2 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/Shm14.java
Index: Shm14.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/Shm14.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Shm14.java 24 Feb 2004 08:48:42 -0000 1.3
+++ Shm14.java 17 Sep 2004 21:57:55 -0000 1.4
@@ -31,8 +31,13 @@
* @author Costin Manolache
*/
public class Shm14 extends Shm {
+
+
// Not ready yet.
-
+
+ private static org.apache.commons.logging.Log log=
+ org.apache.commons.logging.LogFactory.getLog( Shm14.class );
+
MappedByteBuffer bb;
public void init() {
@@ -60,7 +65,8 @@
public int invoke(Msg msg, MsgContext ep )
throws IOException
{
- System.err.println("ChannelShm14.invoke: " + ep );
+ if (log.isDebugEnabled())
+ log.debug("ChannelShm14.invoke: " + ep );
//
1.9 +0 -3 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/WorkerDummy.java
Index: WorkerDummy.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/WorkerDummy.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- WorkerDummy.java 24 Feb 2004 08:48:42 -0000 1.8
+++ WorkerDummy.java 17 Sep 2004 21:57:55 -0000 1.9
@@ -86,8 +86,5 @@
}
private static final int dL=0;
- private static void d(String s ) {
- System.err.println( "WorkerDummy: " + s );
- }
}
1.12 +2 -4 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/IntrospectionUtils.java
Index: IntrospectionUtils.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/IntrospectionUtils.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- IntrospectionUtils.java 17 Sep 2004 18:34:18 -0000 1.11
+++ IntrospectionUtils.java 17 Sep 2004 21:57:55 -0000 1.12
@@ -346,8 +346,7 @@
}
} catch (IllegalArgumentException ex2) {
- System.err.println("IAE " + o + " " + name + " " + value);
- ex2.printStackTrace();
+ log.warn("IAE " + o + " " + name + " " + value, ex2);
} catch (SecurityException ex1) {
if (dbg > 0)
d("SecurityException for " + o.getClass() + " " + name + "="
@@ -399,8 +398,7 @@
}
} catch (IllegalArgumentException ex2) {
- System.err.println("IAE " + o + " " + name);
- ex2.printStackTrace();
+ log.warn("IAE " + o + " " + name, ex2);
} catch (SecurityException ex1) {
if (dbg > 0)
d("SecurityException for " + o.getClass() + " " + name + ")");
1.4 +6 -1 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/collections/SimpleHashtable.java
Index: SimpleHashtable.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/collections/SimpleHashtable.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SimpleHashtable.java 24 Feb 2004 08:50:05 -0000 1.3
+++ SimpleHashtable.java 17 Sep 2004 21:57:55 -0000 1.4
@@ -57,6 +57,10 @@
*/
public final class SimpleHashtable implements Enumeration
{
+
+ private static org.apache.commons.logging.Log log=
+ org.apache.commons.logging.LogFactory.getLog( SimpleHashtable.class );
+
// entries ...
private Entry table[];
@@ -313,6 +317,7 @@
private static final int dL=0;
private void d(String s ) {
- System.err.println( "SimpleHashtable: " + s );
+ if (log.isDebugEnabled())
+ log.debug( "SimpleHashtable: " + s );
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org