mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-18 14:58:47 +00:00
migrate from JUL to SLF4j
This commit is contained in:
1 parent
4ce891eb43
commit
0a951165e5
108 files changed
+688
-631
No files matched your search
@@ -1,7 +1,7 @@
|
||||
package com.avaje.ebeaninternal.api;
|
||||
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Wraps the caller and context class loaders.
|
||||
@@ -14,7 +14,7 @@ import java.util.logging.Logger;
|
||||
*/
|
||||
class ClassLoadContext {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(ClassLoadContext.class.getName());
|
||||
private static final Logger logger = LoggerFactory.getLogger(ClassLoadContext.class);
|
||||
|
||||
private final ClassLoader callerLoader;
|
||||
|
||||
@@ -67,35 +67,35 @@ class ClassLoadContext {
|
||||
public ClassLoader getDefault(boolean preferContext) {
|
||||
|
||||
if (contextLoader == null){
|
||||
if (logger.isLoggable(Level.FINE)){
|
||||
logger.fine("No Context ClassLoader, using "+callerLoader.getClass().getName());
|
||||
if (logger.isDebugEnabled()){
|
||||
logger.debug("No Context ClassLoader, using "+callerLoader.getClass().getName());
|
||||
}
|
||||
return callerLoader;
|
||||
}
|
||||
if (contextLoader == callerLoader){
|
||||
if (logger.isLoggable(Level.FINE)){
|
||||
logger.fine("Context and Caller ClassLoader's same instance of "+contextLoader.getClass().getName());
|
||||
if (logger.isDebugEnabled()){
|
||||
logger.debug("Context and Caller ClassLoader's same instance of "+contextLoader.getClass().getName());
|
||||
}
|
||||
return callerLoader;
|
||||
}
|
||||
|
||||
if (isChild(contextLoader, callerLoader)) {
|
||||
if (logger.isLoggable(Level.FINE)){
|
||||
logger.info("Caller ClassLoader "+callerLoader.getClass().getName()
|
||||
if (logger.isDebugEnabled()){
|
||||
logger.debug("Caller ClassLoader "+callerLoader.getClass().getName()
|
||||
+" child of ContextLoader "+contextLoader.getClass().getName());
|
||||
}
|
||||
return callerLoader;
|
||||
|
||||
} else if (isChild(callerLoader, contextLoader)) {
|
||||
if (logger.isLoggable(Level.FINE)){
|
||||
logger.info("Context ClassLoader "+contextLoader.getClass().getName()
|
||||
if (logger.isDebugEnabled()){
|
||||
logger.debug("Context ClassLoader "+contextLoader.getClass().getName()
|
||||
+" child of Caller ClassLoader "+callerLoader.getClass().getName());
|
||||
}
|
||||
return contextLoader;
|
||||
|
||||
} else {
|
||||
// ambiguous case, perhaps both null
|
||||
logger.info("Ambiguous ClassLoader choice preferContext:"+preferContext
|
||||
logger.debug("Ambiguous ClassLoader choice preferContext:"+preferContext
|
||||
+" Context:"+contextLoader.getClass().getName()+" Caller:"+callerLoader.getClass().getName());
|
||||
ambiguous = true;
|
||||
return preferContext ? contextLoader : callerLoader;
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
package com.avaje.ebeaninternal.api;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Helper to find classes taking into account the context class loader.
|
||||
@@ -10,7 +11,7 @@ import java.util.logging.Logger;
|
||||
*/
|
||||
public class ClassUtil {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(ClassUtil.class.getName());
|
||||
private static final Logger logger = LoggerFactory.getLogger(ClassUtil.class);
|
||||
|
||||
private static boolean preferContext = true;
|
||||
|
||||
|
||||
@@ -5,13 +5,15 @@ import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
||||
import com.avaje.ebeaninternal.server.core.PersistRequestBean;
|
||||
import com.avaje.ebeaninternal.server.deploy.BeanDescriptor;
|
||||
import com.avaje.ebeaninternal.server.transaction.BeanDelta;
|
||||
import com.avaje.ebeaninternal.server.transaction.DeleteByIdMap;
|
||||
import com.avaje.ebeaninternal.server.transaction.IndexInvalidate;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Holds information for a transaction. There is one TransactionEvent instance
|
||||
@@ -23,7 +25,7 @@ import com.avaje.ebeaninternal.server.transaction.IndexInvalidate;
|
||||
*/
|
||||
public class TransactionEvent implements Serializable {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(TransactionEvent.class.getName());
|
||||
private static final Logger logger = LoggerFactory.getLogger(TransactionEvent.class);
|
||||
|
||||
private static final long serialVersionUID = 7230903304106097120L;
|
||||
|
||||
@@ -93,7 +95,7 @@ public class TransactionEvent implements Serializable {
|
||||
*/
|
||||
public void addIndexInvalidate(IndexInvalidate indexEvent){
|
||||
if (pauseIndexInvalidate != null && pauseIndexInvalidate.contains(indexEvent.getIndexName())){
|
||||
logger.fine("--- IGNORE Invalidate on "+indexEvent.getIndexName());
|
||||
logger.debug("--- IGNORE Invalidate on "+indexEvent.getIndexName());
|
||||
return;
|
||||
}
|
||||
if (indexInvalidations == null){
|
||||
|
||||
Reference in new issue
Block a user