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
@@ -12,8 +12,6 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javax.persistence.PersistenceException;
|
||||
|
||||
@@ -73,13 +71,15 @@ import com.avaje.ebeaninternal.server.type.TypeManager;
|
||||
import com.avaje.ebeaninternal.util.SortByClause;
|
||||
import com.avaje.ebeaninternal.util.SortByClause.Property;
|
||||
import com.avaje.ebeaninternal.util.SortByClauseParser;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Describes Beans including their deployment information.
|
||||
*/
|
||||
public class BeanDescriptor<T> {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(BeanDescriptor.class.getName());
|
||||
private static final Logger logger = LoggerFactory.getLogger(BeanDescriptor.class);
|
||||
|
||||
private final ConcurrentHashMap<Integer, SpiUpdatePlan> updatePlanCache = new ConcurrentHashMap<Integer, SpiUpdatePlan>();
|
||||
|
||||
@@ -581,8 +581,8 @@ public class BeanDescriptor<T> {
|
||||
*/
|
||||
public void initialiseId() {
|
||||
|
||||
if (logger.isLoggable(Level.FINER)) {
|
||||
logger.finer("BeanDescriptor initialise " + fullName);
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("BeanDescriptor initialise " + fullName);
|
||||
}
|
||||
|
||||
if (inheritInfo != null) {
|
||||
@@ -774,7 +774,7 @@ public class BeanDescriptor<T> {
|
||||
query.setReadOnly(true);
|
||||
query.setLoadBeanCache(true);
|
||||
List<T> list = query.findList();
|
||||
if (logger.isLoggable(Level.INFO)) {
|
||||
if (logger.isInfoEnabled()) {
|
||||
String msg = "Loaded " + beanType + " cache with [" + list.size() + "] beans";
|
||||
logger.info(msg);
|
||||
}
|
||||
|
||||
@@ -10,8 +10,6 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javax.persistence.PersistenceException;
|
||||
import javax.sql.DataSource;
|
||||
@@ -65,13 +63,15 @@ import com.avaje.ebeaninternal.server.reflect.EnhanceBeanReflectFactory;
|
||||
import com.avaje.ebeaninternal.server.subclass.SubClassManager;
|
||||
import com.avaje.ebeaninternal.server.subclass.SubClassUtil;
|
||||
import com.avaje.ebeaninternal.server.type.TypeManager;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Creates BeanDescriptors.
|
||||
*/
|
||||
public class BeanDescriptorManager implements BeanDescriptorMap {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(BeanDescriptorManager.class.getName());
|
||||
private static final Logger logger = LoggerFactory.getLogger(BeanDescriptorManager.class);
|
||||
|
||||
private static final BeanDescComparator beanDescComparator = new BeanDescComparator();
|
||||
|
||||
@@ -274,7 +274,7 @@ public class BeanDescriptorManager implements BeanDescriptorMap {
|
||||
deplyInfoMap = null;
|
||||
} catch (RuntimeException e) {
|
||||
String msg = "Error in deployment";
|
||||
logger.log(Level.SEVERE, msg, e);
|
||||
logger.error(msg, e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
@@ -410,7 +410,7 @@ public class BeanDescriptorManager implements BeanDescriptorMap {
|
||||
if (GlobalProperties.getBoolean("ebean.strict", true)) {
|
||||
throw new PersistenceException(msg, source);
|
||||
} else {
|
||||
logger.log(Level.SEVERE, msg, source);
|
||||
logger.error(msg, source);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -459,8 +459,7 @@ public class BeanDescriptorManager implements BeanDescriptorMap {
|
||||
int lc = persistListenerManager.getRegisterCount();
|
||||
int fc = beanFinderManager.createBeanFinders(bootupClasses.getBeanFinders());
|
||||
|
||||
logger
|
||||
.fine("BeanPersistControllers[" + cc + "] BeanFinders[" + fc + "] BeanPersistListeners[" + lc + "] BeanQueryAdapters[" + qa + "]");
|
||||
logger.debug("BeanPersistControllers[" + cc + "] BeanFinders[" + fc + "] BeanPersistListeners[" + lc + "] BeanQueryAdapters[" + qa + "]");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -480,7 +479,7 @@ public class BeanDescriptorManager implements BeanDescriptorMap {
|
||||
String subclassEntityNames = subclassedEntities.toString();
|
||||
|
||||
String m = "Mixing enhanced and subclassed entities. Subclassed classes:" + subclassEntityNames;
|
||||
logger.warning(m);
|
||||
logger.warn(m);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -507,9 +506,9 @@ public class BeanDescriptorManager implements BeanDescriptorMap {
|
||||
ArrayList<Class<?>> embeddedClasses = bootupClasses.getEmbeddables();
|
||||
for (int i = 0; i < embeddedClasses.size(); i++) {
|
||||
Class<?> cls = embeddedClasses.get(i);
|
||||
if (logger.isLoggable(Level.FINER)) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
String msg = "load deployinfo for embeddable:" + cls.getName();
|
||||
logger.finer(msg);
|
||||
logger.trace(msg);
|
||||
}
|
||||
BeanDescriptor<?> embDesc = createEmbedded(cls);
|
||||
registerBeanDescriptor(embDesc);
|
||||
@@ -764,7 +763,7 @@ public class BeanDescriptorManager implements BeanDescriptorMap {
|
||||
|
||||
String m = "Implicitly found mappedBy for " + targetDesc + "." + prop;
|
||||
m += " by searching for [" + searchName + "] against " + matchSet;
|
||||
logger.fine(m);
|
||||
logger.debug(m);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1000,7 +999,7 @@ public class BeanDescriptorManager implements BeanDescriptorMap {
|
||||
BeanFinder<T> beanFinder = beanFinderManager.getBeanFinder(beanType);
|
||||
if (beanFinder != null) {
|
||||
descriptor.setBeanFinder(beanFinder);
|
||||
logger.fine("BeanFinder on[" + descriptor.getFullName() + "] " + beanFinder.getClass().getName());
|
||||
logger.debug("BeanFinder on[" + descriptor.getFullName() + "] " + beanFinder.getClass().getName());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1065,7 +1064,7 @@ public class BeanDescriptorManager implements BeanDescriptorMap {
|
||||
// using BeanFinder so perhaps valid without an id
|
||||
} else {
|
||||
// expecting an id property
|
||||
logger.warning(Message.msg("deploy.nouid", desc.getFullName()));
|
||||
logger.warn(Message.msg("deploy.nouid", desc.getFullName()));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -1109,7 +1108,7 @@ public class BeanDescriptorManager implements BeanDescriptorMap {
|
||||
|
||||
String seqName = desc.getIdGeneratorName();
|
||||
if (seqName != null) {
|
||||
logger.fine("explicit sequence " + seqName + " on " + desc.getFullName());
|
||||
logger.debug("explicit sequence " + seqName + " on " + desc.getFullName());
|
||||
} else {
|
||||
String primaryKeyColumn = desc.getSinglePrimaryKeyColumn();
|
||||
// use namingConvention to define sequence name
|
||||
@@ -1266,13 +1265,13 @@ public class BeanDescriptorManager implements BeanDescriptorMap {
|
||||
String name = (String) namedQueryXml.getAttribute("name");
|
||||
Dnode query = namedQueryXml.find("query");
|
||||
if (query == null) {
|
||||
logger.warning("orm.xml " + deployDesc.getFullName() + " named-query missing query element?");
|
||||
logger.warn("orm.xml " + deployDesc.getFullName() + " named-query missing query element?");
|
||||
|
||||
} else {
|
||||
String oql = query.getNodeContent();
|
||||
// TODO: QueryHints not read from xml yet
|
||||
if (name == null || oql == null) {
|
||||
logger.warning("orm.xml " + deployDesc.getFullName() + " named-query has no query content?");
|
||||
logger.warn("orm.xml " + deployDesc.getFullName() + " named-query has no query content?");
|
||||
} else {
|
||||
// add the named query
|
||||
DeployNamedQuery q = new DeployNamedQuery(name, oql, null);
|
||||
@@ -1408,10 +1407,10 @@ public class BeanDescriptorManager implements BeanDescriptorMap {
|
||||
testBean = beanClass.newInstance();
|
||||
} catch (InstantiationException e) {
|
||||
// expected when no default constructor
|
||||
logger.fine("no default constructor on " + beanClass + " e:" + e);
|
||||
logger.debug("no default constructor on " + beanClass + " e:" + e);
|
||||
} catch (IllegalAccessException e) {
|
||||
// expected when no default constructor
|
||||
logger.fine("no default constructor on " + beanClass + " e:" + e);
|
||||
logger.debug("no default constructor on " + beanClass + " e:" + e);
|
||||
}
|
||||
if (testBean instanceof EntityBean == false) {
|
||||
checkSubclass(desc, beanClass);
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package com.avaje.ebeaninternal.server.deploy;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javax.persistence.PersistenceException;
|
||||
|
||||
@@ -16,13 +14,15 @@ import com.avaje.ebeaninternal.server.deploy.id.ImportedIdSimple;
|
||||
import com.avaje.ebeaninternal.server.deploy.meta.DeployBeanPropertyAssoc;
|
||||
import com.avaje.ebeaninternal.server.el.ElPropertyChainBuilder;
|
||||
import com.avaje.ebeaninternal.server.el.ElPropertyValue;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Abstract base for properties mapped to an associated bean, list, set or map.
|
||||
*/
|
||||
public abstract class BeanPropertyAssoc<T> extends BeanProperty {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(BeanPropertyAssoc.class.getName());
|
||||
private static final Logger logger = LoggerFactory.getLogger(BeanPropertyAssoc.class);
|
||||
|
||||
/**
|
||||
* The descriptor of the target. This MUST be initialised after construction
|
||||
@@ -326,7 +326,7 @@ public abstract class BeanPropertyAssoc<T> extends BeanProperty {
|
||||
// simple single scalar id
|
||||
if (cols.length != 1){
|
||||
String msg = "No Imported Id column for ["+props[0]+"] in table ["+join.getTable()+"]";
|
||||
logger.log(Level.SEVERE, msg);
|
||||
logger.error(msg);
|
||||
return null;
|
||||
} else {
|
||||
return createImportedScalar(owner, cols[0], props, others);
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
package com.avaje.ebeaninternal.server.deploy;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.avaje.ebean.event.BeanQueryAdapter;
|
||||
import com.avaje.ebeaninternal.server.core.BootupClasses;
|
||||
import com.avaje.ebeaninternal.server.deploy.meta.DeployBeanDescriptor;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Default implementation for creating BeanControllers.
|
||||
*/
|
||||
public class BeanQueryAdapterManager {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(BeanQueryAdapterManager.class.getName());
|
||||
private static final Logger logger = LoggerFactory.getLogger(BeanQueryAdapterManager.class);
|
||||
|
||||
private final List<BeanQueryAdapter> list;
|
||||
|
||||
@@ -33,7 +34,7 @@ public class BeanQueryAdapterManager {
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
BeanQueryAdapter c = list.get(i);
|
||||
if (c.isRegisterFor(deployDesc.getBeanType())){
|
||||
logger.fine("BeanQueryAdapter on[" + deployDesc.getFullName() + "] " + c.getClass().getName());
|
||||
logger.debug("BeanQueryAdapter on[" + deployDesc.getFullName() + "] " + c.getClass().getName());
|
||||
deployDesc.addQueryAdapter(c);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
package com.avaje.ebeaninternal.server.deploy;
|
||||
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.avaje.ebean.config.GlobalProperties;
|
||||
import com.avaje.ebeaninternal.server.core.InternString;
|
||||
import com.avaje.ebeaninternal.server.deploy.meta.DeployBeanTable;
|
||||
import com.avaje.ebeaninternal.server.deploy.meta.DeployTableJoin;
|
||||
import com.avaje.ebeaninternal.server.deploy.meta.DeployTableJoinColumn;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
||||
/**
|
||||
@@ -21,7 +20,7 @@ import com.avaje.ebeaninternal.server.deploy.meta.DeployTableJoinColumn;
|
||||
*/
|
||||
public class BeanTable {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(BeanTable.class.getName());
|
||||
private static final Logger logger = LoggerFactory.getLogger(BeanTable.class);
|
||||
|
||||
private final Class<?> beanType;
|
||||
|
||||
@@ -106,7 +105,7 @@ public class BeanTable {
|
||||
// just to copy the column name rather than prefix with the foreignKeyPrefix.
|
||||
// I think that with complex keys this is the more common approach.
|
||||
String msg = "On table["+baseTable+"] foreign key column ["+lc+"]";
|
||||
logger.log(Level.FINE, msg);
|
||||
logger.debug(msg);
|
||||
fk = lc;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,6 @@ import java.util.HashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javax.persistence.PersistenceException;
|
||||
|
||||
@@ -16,13 +14,15 @@ import com.avaje.ebeaninternal.server.query.SqlTree;
|
||||
import com.avaje.ebeaninternal.server.query.SqlTreeNode;
|
||||
import com.avaje.ebeaninternal.server.query.SqlTreeNodeRoot;
|
||||
import com.avaje.ebeaninternal.server.query.SqlTreeProperties;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Represents a SqlSelect raw sql query.
|
||||
*/
|
||||
public class DRawSqlSelect {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(DRawSqlSelect.class.getName());
|
||||
private static final Logger logger = LoggerFactory.getLogger(DRawSqlSelect.class);
|
||||
|
||||
private final BeanDescriptor<?> desc;
|
||||
|
||||
@@ -152,7 +152,7 @@ public class DRawSqlSelect {
|
||||
String m = "Mapping for " + desc.getFullName();
|
||||
m += " query["+name+"] column[" + columnInfo + "] index[" + i;
|
||||
m += "] not matched to bean property?";
|
||||
logger.log(Level.SEVERE, m);
|
||||
logger.error(m);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,19 +2,19 @@ package com.avaje.ebeaninternal.server.deploy;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javax.persistence.PersistenceException;
|
||||
|
||||
import com.avaje.ebean.config.NamingConvention;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Parses columnMapping (select clause) mapping columns to bean properties.
|
||||
*/
|
||||
public final class DRawSqlSelectColumnsParser {
|
||||
|
||||
private static Logger logger = Logger.getLogger(DRawSqlSelectColumnsParser.class.getName());
|
||||
private static final Logger logger = LoggerFactory.getLogger(DRawSqlSelectColumnsParser.class);
|
||||
|
||||
/**
|
||||
* Description of how the match was made.
|
||||
@@ -113,13 +113,13 @@ public final class DRawSqlSelectColumnsParser {
|
||||
String msg = "Error in " + parent.getErrName() + ". ";
|
||||
msg += "No matching bean property for column[" + colName + "] columnLabel[" + colLabel
|
||||
+ "] idx[" + columnIndex + "] using search[" + searchColumn + "] found?";
|
||||
logger.log(Level.SEVERE, msg);
|
||||
logger.error(msg);
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
String msg = null;
|
||||
if (debug || logger.isLoggable(Level.FINE)) {
|
||||
if (debug || logger.isDebugEnabled()) {
|
||||
msg = "ColumnMapping ... idx[" + columnIndex + "] match column[" + colName
|
||||
+ "] label[" + colLabel + "] to property[" + prop + "]"
|
||||
+ matchDescription;
|
||||
@@ -127,8 +127,8 @@ public final class DRawSqlSelectColumnsParser {
|
||||
if (debug) {
|
||||
parent.debug(msg);
|
||||
}
|
||||
if (logger.isLoggable(Level.FINE)) {
|
||||
logger.fine(msg);
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug(msg);
|
||||
}
|
||||
|
||||
DRawSqlColumnInfo info = new DRawSqlColumnInfo(colName, colLabel, prop.getName(), prop.isScalar());
|
||||
@@ -150,7 +150,7 @@ public final class DRawSqlSelectColumnsParser {
|
||||
|
||||
String msg = "sql-select trimming quoted identifier from["
|
||||
+ columnLabel + "] to[" + result+ "]";
|
||||
logger.fine(msg);
|
||||
logger.debug(msg);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -5,13 +5,13 @@ import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.avaje.ebeaninternal.server.lib.resource.ResourceContent;
|
||||
import com.avaje.ebeaninternal.server.lib.resource.ResourceSource;
|
||||
import com.avaje.ebeaninternal.server.lib.util.Dnode;
|
||||
import com.avaje.ebeaninternal.server.lib.util.DnodeReader;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Controls the creation and caching of BeanManager's, BeanDescriptors,
|
||||
@@ -22,8 +22,7 @@ import com.avaje.ebeaninternal.server.lib.util.DnodeReader;
|
||||
*/
|
||||
public class DeployOrmXml {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(DeployOrmXml.class.getName());
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(DeployOrmXml.class);
|
||||
|
||||
private final HashMap<String, DNativeQuery> nativeQueryCache;
|
||||
|
||||
@@ -127,7 +126,7 @@ public class DeployOrmXml {
|
||||
return false;
|
||||
}
|
||||
} catch (IOException e) {
|
||||
logger.log(Level.SEVERE, "error reading orm xml deployment " + ormXmlName, e);
|
||||
logger.error("error reading orm xml deployment " + ormXmlName, e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,10 +2,10 @@ package com.avaje.ebeaninternal.server.deploy;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.avaje.ebeaninternal.server.deploy.id.ImportedId;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Build a map of logical to physical names for use in Orm Updates.
|
||||
@@ -13,7 +13,7 @@ import com.avaje.ebeaninternal.server.deploy.id.ImportedId;
|
||||
*/
|
||||
public class DeployUpdateMapFactory {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(DeployUpdateMapFactory.class.getName());
|
||||
private static final Logger logger = LoggerFactory.getLogger(DeployUpdateMapFactory.class);
|
||||
|
||||
/**
|
||||
* Build a map of logical to physical names for use in Orm Updates for a given descriptor.
|
||||
@@ -43,7 +43,7 @@ public class DeployUpdateMapFactory {
|
||||
ImportedId importedId = assocOne.getImportedId();
|
||||
if (importedId == null){
|
||||
String m = descriptor.getFullName()+" importedId is null for associated: "+assocOne.getFullBeanName();
|
||||
logger.log(Level.SEVERE, m);
|
||||
logger.error(m);
|
||||
|
||||
} else if (importedId.isScalar()){
|
||||
deployMap.put(importedId.getLogicalName(), importedId.getDbColumn());
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
package com.avaje.ebeaninternal.server.deploy;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.avaje.ebean.event.BeanPersistController;
|
||||
import com.avaje.ebeaninternal.server.core.BootupClasses;
|
||||
import com.avaje.ebeaninternal.server.deploy.meta.DeployBeanDescriptor;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Default implementation for creating BeanControllers.
|
||||
*/
|
||||
public class PersistControllerManager {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(PersistControllerManager.class.getName());
|
||||
private static final Logger logger = LoggerFactory.getLogger(PersistControllerManager.class);
|
||||
|
||||
private final List<BeanPersistController> list;
|
||||
|
||||
@@ -33,7 +34,7 @@ public class PersistControllerManager {
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
BeanPersistController c = list.get(i);
|
||||
if (c.isRegisterFor(deployDesc.getBeanType())){
|
||||
logger.fine("BeanPersistController on[" + deployDesc.getFullName() + "] " + c.getClass().getName());
|
||||
logger.debug("BeanPersistController on[" + deployDesc.getFullName() + "] " + c.getClass().getName());
|
||||
deployDesc.addPersistController(c);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
package com.avaje.ebeaninternal.server.deploy;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javax.persistence.PersistenceException;
|
||||
|
||||
import com.avaje.ebean.event.BeanPersistListener;
|
||||
import com.avaje.ebeaninternal.server.core.BootupClasses;
|
||||
import com.avaje.ebeaninternal.server.deploy.meta.DeployBeanDescriptor;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Manages the assignment/registration of BeanPersistListener with their
|
||||
@@ -15,7 +16,7 @@ import com.avaje.ebeaninternal.server.deploy.meta.DeployBeanDescriptor;
|
||||
*/
|
||||
public class PersistListenerManager {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(PersistListenerManager.class.getName());
|
||||
private static final Logger logger = LoggerFactory.getLogger(PersistListenerManager.class);
|
||||
|
||||
private final List<BeanPersistListener<?>> list;
|
||||
|
||||
@@ -36,7 +37,7 @@ public class PersistListenerManager {
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
BeanPersistListener<?> c = list.get(i);
|
||||
if (isRegisterFor(deployDesc.getBeanType(), c)) {
|
||||
logger.fine("BeanPersistListener on[" + deployDesc.getFullName() + "] " + c.getClass().getName());
|
||||
logger.debug("BeanPersistListener on[" + deployDesc.getFullName() + "] " + c.getClass().getName());
|
||||
deployDesc.addPersistListener((BeanPersistListener<T>) c);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,8 +12,6 @@ import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.avaje.ebean.Query.UseIndex;
|
||||
import com.avaje.ebean.annotation.ConcurrencyMode;
|
||||
@@ -36,6 +34,8 @@ import com.avaje.ebeaninternal.server.deploy.DeployNamedQuery;
|
||||
import com.avaje.ebeaninternal.server.deploy.DeployNamedUpdate;
|
||||
import com.avaje.ebeaninternal.server.deploy.InheritInfo;
|
||||
import com.avaje.ebeaninternal.server.reflect.BeanReflect;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Describes Beans including their deployment information.
|
||||
@@ -56,7 +56,7 @@ public class DeployBeanDescriptor<T> {
|
||||
|
||||
private static final String I_SCALAOBJECT = "scala.ScalaObject";
|
||||
|
||||
private static final Logger logger = Logger.getLogger(DeployBeanDescriptor.class.getName());
|
||||
private static final Logger logger = LoggerFactory.getLogger(DeployBeanDescriptor.class);
|
||||
|
||||
private static final String META_BEAN_PREFIX = MetaAutoFetchStatistic.class.getName().substring(0, 20);
|
||||
|
||||
@@ -266,7 +266,7 @@ public class DeployBeanDescriptor<T> {
|
||||
if (!"".equals(m)) {
|
||||
m += ". Should it be transient?";
|
||||
String msg = "Bean property " + getFullName() + "." + prop.getName() + " has " + m;
|
||||
logger.log(Level.SEVERE, msg);
|
||||
logger.error(msg);
|
||||
missingMethods = true;
|
||||
}
|
||||
}
|
||||
|
||||
+10
-10
@@ -6,8 +6,6 @@ import java.lang.reflect.Modifier;
|
||||
import java.lang.reflect.ParameterizedType;
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.Iterator;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javax.persistence.PersistenceException;
|
||||
import javax.persistence.Transient;
|
||||
@@ -25,6 +23,8 @@ import com.avaje.ebeaninternal.server.type.CtCompoundType;
|
||||
import com.avaje.ebeaninternal.server.type.ScalarType;
|
||||
import com.avaje.ebeaninternal.server.type.TypeManager;
|
||||
import com.avaje.ebeaninternal.server.type.reflect.CheckImmutableResponse;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Create the properties for a bean.
|
||||
@@ -35,7 +35,7 @@ import com.avaje.ebeaninternal.server.type.reflect.CheckImmutableResponse;
|
||||
*/
|
||||
public class DeployCreateProperties {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(DeployCreateProperties.class.getName());
|
||||
private static final Logger logger = LoggerFactory.getLogger(DeployCreateProperties.class);
|
||||
|
||||
private final DetermineManyType determineManyType;
|
||||
|
||||
@@ -62,11 +62,11 @@ public class DeployCreateProperties {
|
||||
if (prop.isTransient()){
|
||||
if (prop.getWriteMethod() == null || prop.getReadMethod() == null){
|
||||
// Typically a helper method ... this is expected
|
||||
logger.finest("... transient: "+prop.getFullBeanName());
|
||||
logger.trace("... transient: "+prop.getFullBeanName());
|
||||
} else {
|
||||
// dubious, possible error...
|
||||
String msg = Message.msg("deploy.property.nofield", desc.getFullName(), prop.getName());
|
||||
logger.warning(msg);
|
||||
logger.warn(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -112,7 +112,7 @@ public class DeployCreateProperties {
|
||||
|
||||
} else if (Modifier.isTransient(field.getModifiers())) {
|
||||
// not interested in transient fields
|
||||
logger.finer("Skipping transient field "+field.getName()+" in "+beanType.getName());
|
||||
logger.trace("Skipping transient field "+field.getName()+" in "+beanType.getName());
|
||||
|
||||
} else if (ignoreFieldByName(field.getName())) {
|
||||
// not interested this field (ebean or aspectJ field)
|
||||
@@ -142,7 +142,7 @@ public class DeployCreateProperties {
|
||||
} else {
|
||||
String msg = "Huh??? property "+prop.getFullBeanName()+" being defined twice";
|
||||
msg += " but replaced property was not transient? This is not expected?";
|
||||
logger.warning(msg);
|
||||
logger.warn(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -191,7 +191,7 @@ public class DeployCreateProperties {
|
||||
char c = name.charAt(2);
|
||||
if (Character.isUpperCase(c)){
|
||||
String msg = "trimming off 'is' from boolean field name "+name+" in class "+beanType.getName();
|
||||
logger.log(Level.INFO, msg);
|
||||
logger.info(msg);
|
||||
|
||||
return name.substring(2);
|
||||
}
|
||||
@@ -285,7 +285,7 @@ public class DeployCreateProperties {
|
||||
// not supporting this field (generic type used)
|
||||
return null;
|
||||
}
|
||||
logger.warning("Could not find parameter type (via reflection) on "+desc.getFullName()+" "+field.getName());
|
||||
logger.warn("Could not find parameter type (via reflection) on "+desc.getFullName()+" "+field.getName());
|
||||
}
|
||||
return createManyType(desc, targetType, manyType);
|
||||
}
|
||||
@@ -323,7 +323,7 @@ public class DeployCreateProperties {
|
||||
}
|
||||
}
|
||||
} catch (Exception e){
|
||||
logger.log(Level.SEVERE, "Error with "+desc+" field:"+field.getName(), e);
|
||||
logger.error("Error with " + desc + " field:" + field.getName(), e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package com.avaje.ebeaninternal.server.deploy.parse;
|
||||
|
||||
import java.sql.Types;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javax.persistence.EnumType;
|
||||
import javax.persistence.Enumerated;
|
||||
import javax.persistence.PersistenceException;
|
||||
@@ -22,13 +20,15 @@ import com.avaje.ebeaninternal.server.type.ScalarType;
|
||||
import com.avaje.ebeaninternal.server.type.ScalarTypeEnumStandard;
|
||||
import com.avaje.ebeaninternal.server.type.SimpleAesEncryptor;
|
||||
import com.avaje.ebeaninternal.server.type.TypeManager;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Utility object to help processing deployment information.
|
||||
*/
|
||||
public class DeployUtil {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(DeployUtil.class.getName());
|
||||
private static final Logger logger = LoggerFactory.getLogger(DeployUtil.class);
|
||||
|
||||
|
||||
|
||||
@@ -193,7 +193,7 @@ public class DeployUtil {
|
||||
|
||||
} else {
|
||||
// this is ok...
|
||||
logger.finest("... transient property "+msg);
|
||||
logger.trace("... transient property "+msg);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -3,16 +3,16 @@ package com.avaje.ebeaninternal.server.deploy.parse;
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.avaje.ebean.validation.ValidatorMeta;
|
||||
import com.avaje.ebean.validation.factory.Validator;
|
||||
import com.avaje.ebean.validation.factory.ValidatorFactory;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class ValidatorFactoryManager {
|
||||
|
||||
static final Logger logger = Logger.getLogger(ValidatorFactoryManager.class.getName());
|
||||
private static final Logger logger = LoggerFactory.getLogger(ValidatorFactoryManager.class);
|
||||
|
||||
Map<Class<?>, ValidatorFactory> factoryMap;
|
||||
|
||||
@@ -43,7 +43,7 @@ public class ValidatorFactoryManager {
|
||||
|
||||
} catch (Exception e) {
|
||||
String msg = "Error creating ValidatorFactory " + factoryClass.getName();
|
||||
logger.log(Level.SEVERE, msg, e);
|
||||
logger.error(msg, e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user