clean up some logging

- reduce some INFO messages to DEBUG
- delete unused messages
- some minor formatting changes

Signed-off-by: Gavin King <gavin@hibernate.org>
This commit is contained in:
Gavin King 2024-06-03 14:04:34 +02:00 committed by Steve Ebersole
parent 086c7208cb
commit 0cbdc44fbc
9 changed files with 26 additions and 847 deletions

View File

@ -90,8 +90,6 @@ public class RDMSOS2200Dialect extends Dialect {
*/
public RDMSOS2200Dialect() {
super( SimpleDatabaseVersion.ZERO_VERSION );
// Display the dialect version.
LOG.rdmsOs2200Dialect();
}
public RDMSOS2200Dialect(DialectResolutionInfo info) {

View File

@ -6,7 +6,6 @@
*/
package org.hibernate.boot.model.relational;
import java.sql.Types;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
@ -26,7 +25,6 @@ import org.hibernate.boot.model.naming.PhysicalNamingStrategy;
import org.hibernate.engine.jdbc.env.spi.JdbcEnvironment;
import org.hibernate.internal.CoreLogging;
import org.hibernate.internal.CoreMessageLogger;
import org.hibernate.mapping.AggregateColumn;
import org.hibernate.mapping.Column;
import org.hibernate.mapping.DenormalizedTable;
import org.hibernate.mapping.Table;

View File

@ -27,30 +27,6 @@ import static org.jboss.logging.Logger.Level.WARN;
@ValidIdRange( min = 15001, max = 20000 )
public interface EntityManagerMessageLogger extends CoreMessageLogger {
@LogMessage(level = INFO)
@Message(value = "Bound Ejb3Configuration to JNDI name: %s", id = 15001)
void boundEjb3ConfigurationToJndiName(String name);
@LogMessage(level = INFO)
@Message(value = "Ejb3Configuration name: %s", id = 15002)
void ejb3ConfigurationName(String name);
@LogMessage(level = INFO)
@Message(value = "An Ejb3Configuration was renamed from name: %s", id = 15003)
void ejb3ConfigurationRenamedFromName(String name);
@LogMessage(level = INFO)
@Message(value = "An Ejb3Configuration was unbound from name: %s", id = 15004)
void ejb3ConfigurationUnboundFromName(String name);
@LogMessage(level = WARN)
@Message(value = "Exploded jar file does not exist (ignored): %s", id = 15005)
void explodedJarDoesNotExist(URL jarUrl);
@LogMessage(level = WARN)
@Message(value = "Exploded jar file not a directory (ignored): %s", id = 15006)
void explodedJarNotDirectory(URL jarUrl);
@LogMessage(level = ERROR)
@Message(value = "Illegal argument on static metamodel field injection : %s#%s; expected type : %s; encountered type : %s", id = 15007)
void illegalArgumentOnStaticMetamodelFieldInjection(
@ -59,51 +35,18 @@ public interface EntityManagerMessageLogger extends CoreMessageLogger {
String name3,
String name4);
@LogMessage(level = ERROR)
@Message(value = "Malformed URL: %s", id = 15008)
void malformedUrl(
URL jarUrl,
@Cause URISyntaxException e);
@LogMessage(level = WARN)
@Message(value = "Malformed URL: %s", id = 15009)
void malformedUrlWarning(
URL jarUrl,
@Cause URISyntaxException e);
@LogMessage(level = WARN)
@Message(value = "Unable to find file (ignored): %s", id = 15010)
void unableToFindFile(
URL jarUrl,
@Cause Exception e);
@LogMessage(level = WARN)
@Message(value = "Unable to locate static metamodel field : %s#%s; this may or may not indicate a problem with the static metamodel", id = 15011)
void unableToLocateStaticMetamodelField(
String name,
String name2);
@LogMessage(level = INFO)
@Message(value = "Using provided datasource", id = 15012)
void usingProvidedDataSource();
@LogMessage(level = DEBUG)
@Message(value = "Returning null (as required by JPA spec) rather than throwing EntityNotFoundException, " +
"as the entity (type=%s, id=%s) does not exist", id = 15013)
void ignoringEntityNotFound(String entityName, String identifier);
@LogMessage(level = WARN)
@Message(
value = "DEPRECATION - attempt to refer to JPA positional parameter [?%1$s] using String name [\"%1$s\"] " +
"rather than int position [%1$s] (generally in Query#setParameter, Query#getParameter or " +
"Query#getParameterValue calls). Hibernate previously allowed such usage, but it is considered " +
"deprecated.",
id = 15014
)
void deprecatedJpaPositionalParameterAccess(Integer jpaPositionalParameter);
@LogMessage(level = INFO)
@LogMessage(level = DEBUG)
@Message(
id = 15015,
value = "Encountered a MappedSuperclass [%s] not used in any entity hierarchy"

View File

@ -53,7 +53,7 @@ public interface QueryLogging extends BasicLogger {
void namedQueryError(String queryName, @Cause HibernateException e);
@LogMessage(level = INFO)
@Message(value = "Unable to determine lock mode value : %s -> %s", id = 90003002)
@Message(value = "Unable to determine lock mode value: %s -> %s", id = 90003002)
void unableToDetermineLockModeValue(String hintName, Object value);
@LogMessage(level = INFO)

View File

@ -39,7 +39,7 @@ public interface ProxoolMessageLogger extends ConnectionInfoLogger {
* @param proxoolAlias The name (alias) of the proxool pool
*/
@LogMessage(level = DEBUG)
@Message(value = "Configuring Proxool Provider to use pool alias: %s", id = 30002)
@Message(value = "Configuring Proxool to use pool alias: %s", id = 30002)
void configuringProxoolProviderToUsePoolAlias(String proxoolAlias);
/**
@ -48,7 +48,7 @@ public interface ProxoolMessageLogger extends ConnectionInfoLogger {
* @param proxoolAlias The name (alias) of the proxool pool
*/
@LogMessage(level = DEBUG)
@Message(value = "Configuring Proxool Provider using existing pool in memory: %s", id = 30003)
@Message(value = "Configuring Proxool using existing pool in memory: %s", id = 30003)
void configuringProxoolProviderUsingExistingPool(String proxoolAlias);
/**
@ -57,7 +57,7 @@ public interface ProxoolMessageLogger extends ConnectionInfoLogger {
* @param jaxpFile The XML configuration file to use
*/
@LogMessage(level = DEBUG)
@Message(value = "Configuring Proxool Provider using JAXPConfigurator: %s", id = 30004)
@Message(value = "Configuring Proxool using JAXPConfigurator: %s", id = 30004)
void configuringProxoolProviderUsingJaxpConfigurator(String jaxpFile);
/**
@ -66,7 +66,7 @@ public interface ProxoolMessageLogger extends ConnectionInfoLogger {
* @param propFile The properties file to use
*/
@LogMessage(level = DEBUG)
@Message(value = "Configuring Proxool Provider using Properties File: %s", id = 30005)
@Message(value = "Configuring Proxool using properties file: %s", id = 30005)
void configuringProxoolProviderUsingPropertiesFile(String propFile);
}

View File

@ -16,6 +16,7 @@ import org.jboss.logging.annotations.Message;
import org.jboss.logging.annotations.MessageLogger;
import org.jboss.logging.annotations.ValidIdRange;
import static org.jboss.logging.Logger.Level.DEBUG;
import static org.jboss.logging.Logger.Level.INFO;
/**
@ -37,18 +38,18 @@ public interface HSMessageLogger extends BasicLogger {
HSMessageLogger SPATIAL_MSG_LOGGER = Logger.getMessageLogger( HSMessageLogger.class, LOGGER_NAME );
@LogMessage(level = INFO)
@Message(value = "hibernate-spatial integration enabled : %s", id = 80000001)
@Message(value = "Hibernate Spatial integration enabled: %s", id = 80000001)
void spatialEnabled(boolean enabled);
@LogMessage(level = INFO)
@Message(value = "hibernate-spatial using Connection Finder for creating Oracle types : %s", id = 80000002)
@LogMessage(level = DEBUG)
@Message(value = "Hibernate Spatial using Connection Finder for creating Oracle types: %s", id = 80000002)
void connectionFinder(String className);
@LogMessage(level = INFO) //maybe should be DEBUG?
@Message(value = "hibernate-spatial adding type contributions from : %s", id = 80000003)
@LogMessage(level = DEBUG)
@Message(value = "hibernate-spatial adding type contributions from: %s", id = 80000003)
void typeContributions(String source);
@LogMessage(level = INFO) //maybe should be DEBUG?
@Message(value = "hibernate-spatial adding function contributions from : %s", id = 80000004)
@LogMessage(level = DEBUG)
@Message(value = "hibernate-spatial adding function contributions from: %s", id = 80000004)
void functionContributions(String source);
}

View File

@ -13,11 +13,8 @@ import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import org.hibernate.internal.CoreMessageLogger;
import org.hibernate.mapping.ForeignKey;
import static org.hibernate.internal.CoreLogging.messageLogger;
/**
* JDBC table metadata
*
@ -29,7 +26,6 @@ import static org.hibernate.internal.CoreLogging.messageLogger;
*/
@Deprecated
public class TableMetadata {
private static final CoreMessageLogger LOG = messageLogger( TableMetadata.class );
private final String catalog;
private final String schema;
@ -47,14 +43,6 @@ public class TableMetadata {
initForeignKeys( meta );
initIndexes( meta );
}
String cat = catalog == null ? "" : catalog + '.';
String schem = schema == null ? "" : schema + '.';
LOG.tableFound( cat + schem + name );
LOG.columns( columns.keySet() );
if ( extras ) {
LOG.foreignKeys( foreignKeys.keySet() );
LOG.indexes( indexes.keySet() );
}
}
public String getName() {