migrate from JUL to SLF4j

This commit is contained in:
Richard Vowles committed 2013-04-11 21:53:25 +12:00
1 parent 4ce891eb43
commit 0a951165e5
108 files changed
+688 -631

No files matched your search

@@ -1,7 +1,7 @@
package com.avaje.ebeaninternal.server.lib.thread;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* A thread that belongs to a ThreadPool. It will return to the Threadpool when
@@ -9,7 +9,7 @@ import java.util.logging.Logger;
*/
public class PooledThread implements Runnable {
private static final Logger logger = Logger.getLogger(PooledThread.class.getName());
private static final Logger logger = LoggerFactory.getLogger(PooledThread.class);
/**
* Create the PooledThread.
@@ -89,7 +89,7 @@ public class PooledThread implements Runnable {
work.getRunnable().run();
} catch (Throwable ex) {
logger.log(Level.SEVERE, null, ex);
logger.error(null, ex);
if (wasInterrupted) {
this.isStopping = true;
@@ -99,7 +99,7 @@ public class PooledThread implements Runnable {
thread.interrupt();
} catch (Exception e){
String msg = "Error interrupting PooledThead["+name+"]";
logger.log(Level.SEVERE, msg, e);
logger.error(msg, e);
}
return;
}
@@ -1,10 +1,11 @@
package com.avaje.ebeaninternal.server.lib.thread;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Vector;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* This is a pool of threads which can be assigned work.
@@ -16,7 +17,7 @@ import java.util.logging.Logger;
*/
public class ThreadPool {
private static final Logger logger = Logger.getLogger(ThreadPool.class.getName());
private static final Logger logger = LoggerFactory.getLogger(ThreadPool.class);
/**
* The max idle time used to trim idle threads from the pool.
@@ -334,7 +335,7 @@ public class ThreadPool {
} catch (InterruptedException e) {
logger.log(Level.SEVERE, null, e);
logger.error(null, e);
}
}
}
@@ -441,8 +442,8 @@ public class ThreadPool {
PooledThread bgw = new PooledThread(this, threadName, isDaemon, threadPriority);
bgw.start();
if (logger.isLoggable(Level.FINE)) {
logger.fine("ThreadPool grow created [" + threadName + "] size[" + size() + "]");
if (logger.isDebugEnabled()) {
logger.debug("ThreadPool grow created [" + threadName + "] size[" + size() + "]");
}
if (andReturn) {
return bgw;