User: starksm
Date: 01/09/11 11:35:04
Modified: src/main/org/jboss/util/timeout TimeoutFactory.java
Log:
Convert all logging to org.jboss.logging.Logger which is a subclass of
org.apache.log4j.Category.
Revision Changes Path
1.8 +11 -15 jboss/src/main/org/jboss/util/timeout/TimeoutFactory.java
Index: TimeoutFactory.java
===================================================================
RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/util/timeout/TimeoutFactory.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- TimeoutFactory.java 2001/09/01 19:50:33 1.7
+++ TimeoutFactory.java 2001/09/11 18:35:04 1.8
@@ -6,7 +6,6 @@
*/
package org.jboss.util.timeout;
-// TODO this needs to be replaced with the log4j logging
import org.jboss.logging.Logger;
@@ -23,10 +22,12 @@
* allocating anything on the heap.
*
* @author <a href="[EMAIL PROTECTED]">Ole Husgaard</a>
- * @version $Revision: 1.7 $
+ * @version $Revision: 1.8 $
*/
public class TimeoutFactory {
+ private static Logger log = Logger.create(TimeoutFactory.class);
+
// Code commented out with the mark "INV:" are runtime checks
// of invariants that are not needed for a production system.
// For problem solving, you can remove these comments.
@@ -99,8 +100,7 @@
try {
work.target.timedOut(work);
} catch (Throwable t) {
- Logger.exception(t);
- //t.printStackTrace();
+ log.error(t);
}
synchronized (work) {
if (work.index == TimeoutImpl.CWAIT) {
@@ -245,19 +245,15 @@
/**
* Debugging helper.
*/
- private void assert(boolean expr) {
- if (!expr) {
- Logger.error("***** assert failed *****");
- //System.err.println("***** assert failed *****");
- try {
- throw new RuntimeException("***** assert failed *****");
- } catch (RuntimeException ex) {
- Logger.exception(ex);
- //ex.printStackTrace();
- }
+ private void assert(boolean expr)
+ {
+ if (!expr)
+ {
+ RuntimeException ex = new RuntimeException("***** assert failed *****");
+ log.error("***** assert failed *****", ex);
try {
Thread.sleep(30000);
- } catch (Exception ex) {}
+ } catch (Exception e) {}
}
}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development