mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-17 00:24:57 +00:00
HHH-6250 - Some classes still using SLF4J
This commit is contained in:
parent
0b7514d100
commit
1d8c06b321
@ -182,7 +182,7 @@
|
|||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public final class AnnotationBinder {
|
public final class AnnotationBinder {
|
||||||
|
|
||||||
private static final CoreMessageLogger LOG = Logger.getMessageLogger(CoreMessageLogger.class, AnnotationBinder.class.getName());
|
private static final CoreMessageLogger LOG = Logger.getMessageLogger( CoreMessageLogger.class, AnnotationBinder.class.getName() );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Some design description
|
* Some design description
|
||||||
|
@ -90,6 +90,10 @@ public interface CoreMessageLogger extends BasicLogger {
|
|||||||
@Message(value = "On release of batch it still contained JDBC statements", id = 10)
|
@Message(value = "On release of batch it still contained JDBC statements", id = 10)
|
||||||
void batchContainedStatementsOnRelease();
|
void batchContainedStatementsOnRelease();
|
||||||
|
|
||||||
|
@LogMessage(level = INFO)
|
||||||
|
@Message(value = "Binding entity from annotated class: %s", id = 15)
|
||||||
|
void bindingEntityFromAnnotatedClass(String className);
|
||||||
|
|
||||||
@LogMessage(level = INFO)
|
@LogMessage(level = INFO)
|
||||||
@Message(value = "Bytecode provider name : %s", id = 21)
|
@Message(value = "Bytecode provider name : %s", id = 21)
|
||||||
void bytecodeProvider(String provider);
|
void bytecodeProvider(String provider);
|
||||||
|
@ -25,9 +25,8 @@
|
|||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
import org.hibernate.internal.CoreMessageLogger;
|
||||||
import org.jboss.jandex.Index;
|
import org.jboss.jandex.Index;
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import org.hibernate.metamodel.source.annotations.entity.ConfiguredClass;
|
import org.hibernate.metamodel.source.annotations.entity.ConfiguredClass;
|
||||||
import org.hibernate.metamodel.source.annotations.entity.ConfiguredClassHierarchy;
|
import org.hibernate.metamodel.source.annotations.entity.ConfiguredClassHierarchy;
|
||||||
@ -40,6 +39,7 @@
|
|||||||
import org.hibernate.metamodel.source.annotations.global.TableBinder;
|
import org.hibernate.metamodel.source.annotations.global.TableBinder;
|
||||||
import org.hibernate.metamodel.source.annotations.util.ConfiguredClassHierarchyBuilder;
|
import org.hibernate.metamodel.source.annotations.util.ConfiguredClassHierarchyBuilder;
|
||||||
import org.hibernate.metamodel.source.internal.MetadataImpl;
|
import org.hibernate.metamodel.source.internal.MetadataImpl;
|
||||||
|
import org.jboss.logging.Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main class responsible to creating and binding the Hibernate meta-model from annotations.
|
* Main class responsible to creating and binding the Hibernate meta-model from annotations.
|
||||||
@ -50,8 +50,7 @@
|
|||||||
*/
|
*/
|
||||||
public class AnnotationBinder {
|
public class AnnotationBinder {
|
||||||
|
|
||||||
private static final Logger LOG = LoggerFactory.getLogger( AnnotationBinder.class );
|
private static final CoreMessageLogger LOG = Logger.getMessageLogger( CoreMessageLogger.class, AnnotationBinder.class.getName() );
|
||||||
|
|
||||||
private final MetadataImpl metadata;
|
private final MetadataImpl metadata;
|
||||||
private final Index index;
|
private final Index index;
|
||||||
|
|
||||||
@ -86,7 +85,7 @@ private void bindMappedClasses() {
|
|||||||
// now we process each hierarchy one at the time
|
// now we process each hierarchy one at the time
|
||||||
for ( ConfiguredClassHierarchy hierarchy : hierarchies ) {
|
for ( ConfiguredClassHierarchy hierarchy : hierarchies ) {
|
||||||
for ( ConfiguredClass configuredClass : hierarchy ) {
|
for ( ConfiguredClass configuredClass : hierarchy ) {
|
||||||
LOG.info( "Binding entity from annotated class: {}", configuredClass.getName() );
|
LOG.bindingEntityFromAnnotatedClass( configuredClass.getName() );
|
||||||
EntityBinder entityBinder = new EntityBinder( metadata, configuredClass );
|
EntityBinder entityBinder = new EntityBinder( metadata, configuredClass );
|
||||||
entityBinder.bind();
|
entityBinder.bind();
|
||||||
}
|
}
|
||||||
|
@ -32,9 +32,8 @@
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.dom4j.Element;
|
import org.dom4j.Element;
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
|
import org.hibernate.internal.CoreMessageLogger;
|
||||||
import org.hibernate.internal.util.StringHelper;
|
import org.hibernate.internal.util.StringHelper;
|
||||||
import org.hibernate.internal.util.collections.JoinedIterator;
|
import org.hibernate.internal.util.collections.JoinedIterator;
|
||||||
import org.hibernate.internal.util.xml.XmlDocument;
|
import org.hibernate.internal.util.xml.XmlDocument;
|
||||||
@ -42,6 +41,7 @@
|
|||||||
import org.hibernate.metamodel.source.internal.JaxbRoot;
|
import org.hibernate.metamodel.source.internal.JaxbRoot;
|
||||||
import org.hibernate.metamodel.source.hbm.xml.mapping.XMLHibernateMapping;
|
import org.hibernate.metamodel.source.hbm.xml.mapping.XMLHibernateMapping;
|
||||||
import org.hibernate.metamodel.source.spi.MetadataImplementor;
|
import org.hibernate.metamodel.source.spi.MetadataImplementor;
|
||||||
|
import org.jboss.logging.Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Binder for {@code hbm.xml} files
|
* Binder for {@code hbm.xml} files
|
||||||
@ -49,7 +49,7 @@
|
|||||||
* @author Steve Ebersole
|
* @author Steve Ebersole
|
||||||
*/
|
*/
|
||||||
public class HibernateXmlBinder {
|
public class HibernateXmlBinder {
|
||||||
private static final Logger log = LoggerFactory.getLogger( HibernateXmlBinder.class );
|
private static final CoreMessageLogger LOG = Logger.getMessageLogger( CoreMessageLogger.class, HibernateXmlBinder.class.getName() );
|
||||||
|
|
||||||
private final MetadataImplementor metadata;
|
private final MetadataImplementor metadata;
|
||||||
private final Map<String, MetaAttribute> globalMetas;
|
private final Map<String, MetaAttribute> globalMetas;
|
||||||
@ -64,7 +64,7 @@ public HibernateXmlBinder(MetadataImplementor metadata, Map<String, MetaAttribut
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void bindRoot(JaxbRoot<XMLHibernateMapping> jaxbRoot) {
|
public void bindRoot(JaxbRoot<XMLHibernateMapping> jaxbRoot) {
|
||||||
log.debug( jaxbRoot.toString() );
|
if (LOG.isDebugEnabled()) LOG.debugf( jaxbRoot.toString() );
|
||||||
bindRoot( jaxbRoot, Collections.<String>emptySet() );
|
bindRoot( jaxbRoot, Collections.<String>emptySet() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,8 +33,8 @@
|
|||||||
import javax.xml.validation.Schema;
|
import javax.xml.validation.Schema;
|
||||||
import javax.xml.validation.SchemaFactory;
|
import javax.xml.validation.SchemaFactory;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.hibernate.internal.CoreMessageLogger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.jboss.logging.Logger;
|
||||||
import org.xml.sax.SAXException;
|
import org.xml.sax.SAXException;
|
||||||
|
|
||||||
import org.hibernate.metamodel.source.Origin;
|
import org.hibernate.metamodel.source.Origin;
|
||||||
@ -45,7 +45,7 @@
|
|||||||
* @author Hardy Ferentschik
|
* @author Hardy Ferentschik
|
||||||
*/
|
*/
|
||||||
public class XmlHelper {
|
public class XmlHelper {
|
||||||
private static final Logger log = LoggerFactory.getLogger( XmlHelper.class );
|
private static final CoreMessageLogger LOG = Logger.getMessageLogger( CoreMessageLogger.class, XmlHelper.class.getName() );
|
||||||
|
|
||||||
private XmlHelper() {
|
private XmlHelper() {
|
||||||
}
|
}
|
||||||
@ -71,7 +71,7 @@ private static Schema getMappingSchema(String schemaVersion, ClassLoaderService
|
|||||||
schema = sf.newSchema( schemaUrl );
|
schema = sf.newSchema( schemaUrl );
|
||||||
}
|
}
|
||||||
catch ( SAXException e ) {
|
catch ( SAXException e ) {
|
||||||
log.debug( "Unable to create schema for {}: {}", schemaVersion, e.getMessage() );
|
LOG.debugf( "Unable to create schema for %s: %s", schemaVersion, e.getMessage() );
|
||||||
}
|
}
|
||||||
return schema;
|
return schema;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user