Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion design/logger_id_ranges.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ well as some helper info such as whether DEBUG or TRACE are enabled. E.g.:
public interface MappingModelCreationLogger extends BasicLogger {
String LOGGER_NAME = "org.hibernate.orm.model.mapping.creation";

MappingModelCreationLogger LOGGER = Logger.getMessageLogger( MappingModelCreationLogger.class, LOGGER_NAME );
MappingModelCreationLogger LOGGER = Logger.getMessageLogger( MappingModelCreationLogger.class, LOGGER_NAME, Locale.ROOT );

boolean TRACE_ENABLED = LOGGER.isTraceEnabled();
boolean DEBUG_ENABLED = LOGGER.isDebugEnabled();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import org.jboss.logging.annotations.ValidIdRange;

import java.lang.invoke.MethodHandles;
import java.util.Locale;

import static org.jboss.logging.Logger.Level.WARN;

Expand All @@ -32,7 +33,7 @@
public interface C3P0MessageLogger extends ConnectionInfoLogger {
String NAME = ConnectionInfoLogger.LOGGER_NAME + ".c3p0";

C3P0MessageLogger C3P0_MSG_LOGGER = Logger.getMessageLogger( MethodHandles.lookup(), C3P0MessageLogger.class, NAME );
C3P0MessageLogger C3P0_MSG_LOGGER = Logger.getMessageLogger( MethodHandles.lookup(), C3P0MessageLogger.class, NAME, Locale.ROOT );

/**
* Log a message (WARN) about conflicting {@code hibernate.c3p0.XYZ} and {@code c3p0.XYZ} settings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
package org.hibernate.action.internal;

import java.lang.invoke.MethodHandles;
import java.util.Locale;
import java.util.Set;

import org.hibernate.Internal;
Expand Down Expand Up @@ -34,7 +35,7 @@ public interface ActionLogging extends BasicLogger {
String NAME = SubSystemLogging.BASE + ".action";

ActionLogging ACTION_LOGGER = Logger.getMessageLogger(
MethodHandles.lookup(), ActionLogging.class, NAME
MethodHandles.lookup(), ActionLogging.class, NAME, Locale.ROOT
);

int NAMESPACE = 90032000;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import org.hibernate.internal.log.SubSystemLogging;

import java.lang.invoke.MethodHandles;
import java.util.Locale;

import org.jboss.logging.BasicLogger;
import org.jboss.logging.Logger;
Expand Down Expand Up @@ -39,7 +40,7 @@
@Internal
public interface BootLogging extends BasicLogger {
String NAME = SubSystemLogging.BASE + ".boot";
BootLogging BOOT_LOGGER = Logger.getMessageLogger( MethodHandles.lookup(), BootLogging.class, NAME );
BootLogging BOOT_LOGGER = Logger.getMessageLogger( MethodHandles.lookup(), BootLogging.class, NAME, Locale.ROOT );

@LogMessage(level = WARN)
@Message(id = 160101, value = "Duplicate generator name: '%s'")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import java.lang.invoke.MethodHandles;
import java.net.URL;
import java.util.Locale;

/**
* Logging related to {@linkplain org.hibernate.boot.archive.scan.spi.Scanner scanning}.
Expand All @@ -30,7 +31,7 @@
public interface ScannerLogger extends BasicLogger {
String NAME = BootLogging.NAME + ".scan";

ScannerLogger SCANNER_LOGGER = Logger.getMessageLogger( MethodHandles.lookup(), ScannerLogger.class, NAME );
ScannerLogger SCANNER_LOGGER = Logger.getMessageLogger( MethodHandles.lookup(), ScannerLogger.class, NAME, Locale.ROOT );

@LogMessage(level = Logger.Level.WARN)
@Message(id = 60001, value = "Multiple ScannerFactory services available; using '%s'")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import org.jboss.logging.annotations.ValidIdRange;

import java.lang.invoke.MethodHandles;
import java.util.Locale;

import static org.hibernate.cfg.ValidationSettings.JAKARTA_VALIDATION_MODE;
import static org.jboss.logging.Logger.Level.DEBUG;
Expand All @@ -35,7 +36,7 @@
public interface BeanValidationLogger extends BasicLogger {
String NAME = SubSystemLogging.BASE + ".beanvalidation";

BeanValidationLogger BEAN_VALIDATION_LOGGER = Logger.getMessageLogger( MethodHandles.lookup(), BeanValidationLogger.class, NAME );
BeanValidationLogger BEAN_VALIDATION_LOGGER = Logger.getMessageLogger( MethodHandles.lookup(), BeanValidationLogger.class, NAME, Locale.ROOT );

@LogMessage(level = DEBUG)
@Message(id = 101001, value = "Unable to acquire Jakarta Validation ValidatorFactory, skipping activation")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import java.io.FileNotFoundException;
import java.io.IOException;
import java.lang.invoke.MethodHandles;
import java.util.Locale;

import static org.jboss.logging.Logger.Level.DEBUG;
import static org.jboss.logging.Logger.Level.INFO;
Expand All @@ -39,7 +40,7 @@
@Internal
public interface JaxbLogger extends BasicLogger {
String LOGGER_NAME = BootLogging.NAME + ".jaxb";
JaxbLogger JAXB_LOGGER = Logger.getMessageLogger( MethodHandles.lookup(), JaxbLogger.class, LOGGER_NAME );
JaxbLogger JAXB_LOGGER = Logger.getMessageLogger( MethodHandles.lookup(), JaxbLogger.class, LOGGER_NAME, Locale.ROOT );

@LogMessage(level = DEBUG)
@Message(id = 90005501, value = "Unable to close StAX reader")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import org.jboss.logging.annotations.ValidIdRange;

import java.lang.invoke.MethodHandles;
import java.util.Locale;

import static org.jboss.logging.Logger.Level.DEBUG;
import static org.jboss.logging.Logger.Level.INFO;
Expand All @@ -32,7 +33,7 @@
@Internal
public interface BytecodeEnhancementLogging extends BasicLogger {
String LOGGER_NAME = SubSystemLogging.BASE + ".bytecode.enhancement";
BytecodeEnhancementLogging ENHANCEMENT_LOGGER = Logger.getMessageLogger( MethodHandles.lookup(), BytecodeEnhancementLogging.class, LOGGER_NAME );
BytecodeEnhancementLogging ENHANCEMENT_LOGGER = Logger.getMessageLogger( MethodHandles.lookup(), BytecodeEnhancementLogging.class, LOGGER_NAME, Locale.ROOT );

// ---- trace messages ----
@LogMessage(level = TRACE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.jboss.logging.annotations.ValidIdRange;

import java.lang.invoke.MethodHandles;
import java.util.Locale;

import static org.jboss.logging.Logger.Level.TRACE;
import static org.jboss.logging.Logger.Level.DEBUG;
Expand All @@ -34,7 +35,7 @@ public interface BytecodeInterceptorLogging extends BasicLogger {
String LOGGER_NAME = SubSystemLogging.BASE + ".bytecode.interceptor";

Logger LOGGER = Logger.getLogger( LOGGER_NAME );
BytecodeInterceptorLogging BYTECODE_INTERCEPTOR_LOGGER = Logger.getMessageLogger( MethodHandles.lookup(), BytecodeInterceptorLogging.class, LOGGER_NAME );
BytecodeInterceptorLogging BYTECODE_INTERCEPTOR_LOGGER = Logger.getMessageLogger( MethodHandles.lookup(), BytecodeInterceptorLogging.class, LOGGER_NAME, Locale.ROOT );

@LogMessage(level = WARN)
@Message(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import java.lang.invoke.MethodHandles;
import java.util.UUID;
import java.util.Locale;

import static org.hibernate.cfg.CacheSettings.CACHE_REGION_FACTORY;
import static org.jboss.logging.Logger.Level.DEBUG;
Expand All @@ -37,7 +38,7 @@
public interface SecondLevelCacheLogger extends BasicLogger {
String LOGGER_NAME = SubSystemLogging.BASE + ".cache";

SecondLevelCacheLogger L2CACHE_LOGGER = Logger.getMessageLogger( MethodHandles.lookup(), SecondLevelCacheLogger.class, LOGGER_NAME );
SecondLevelCacheLogger L2CACHE_LOGGER = Logger.getMessageLogger( MethodHandles.lookup(), SecondLevelCacheLogger.class, LOGGER_NAME, Locale.ROOT );

int NAMESPACE = 90001000;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.jboss.logging.annotations.ValidIdRange;

import java.lang.invoke.MethodHandles;
import java.util.Locale;

import static org.jboss.logging.Logger.Level.DEBUG;
import static org.jboss.logging.Logger.Level.INFO;
Expand All @@ -33,7 +34,7 @@
public interface CollectionLogger extends BasicLogger {
String NAME = SubSystemLogging.BASE + ".collection";

CollectionLogger COLLECTION_LOGGER = Logger.getMessageLogger( MethodHandles.lookup(), CollectionLogger.class, NAME );
CollectionLogger COLLECTION_LOGGER = Logger.getMessageLogger( MethodHandles.lookup(), CollectionLogger.class, NAME, Locale.ROOT );

@LogMessage(level = WARN)
@Message(id = 90030001, value = "Unable to close temporary session used to load lazy collection associated to no session")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import org.jboss.logging.annotations.ValidIdRange;

import java.lang.invoke.MethodHandles;
import java.util.Locale;

import static org.jboss.logging.Logger.Level.DEBUG;
import static org.jboss.logging.Logger.Level.TRACE;
Expand All @@ -34,7 +35,7 @@
public interface CurrentSessionLogging extends BasicLogger {
String NAME = SubSystemLogging.BASE + ".current_session";

CurrentSessionLogging CURRENT_SESSION_LOGGER = Logger.getMessageLogger( MethodHandles.lookup(), CurrentSessionLogging.class, NAME );
CurrentSessionLogging CURRENT_SESSION_LOGGER = Logger.getMessageLogger( MethodHandles.lookup(), CurrentSessionLogging.class, NAME, Locale.ROOT );

@LogMessage(level = WARN)
@Message(id = 90070001, value = "Session already bound on call to bind(); make sure you clean up your sessions")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import org.jboss.logging.annotations.ValidIdRange;

import java.lang.invoke.MethodHandles;
import java.util.Locale;

import static org.jboss.logging.Logger.Level.DEBUG;

Expand All @@ -30,7 +31,7 @@
public interface DialectLogging {
String LOGGER_NAME = SubSystemLogging.BASE + ".dialect";
Logger DIALECT_LOGGER = Logger.getLogger(LOGGER_NAME);
DialectLogging DIALECT_MESSAGE_LOGGER = Logger.getMessageLogger( MethodHandles.lookup(), DialectLogging.class, LOGGER_NAME );
DialectLogging DIALECT_MESSAGE_LOGGER = Logger.getMessageLogger( MethodHandles.lookup(), DialectLogging.class, LOGGER_NAME, Locale.ROOT );

@LogMessage(level = DEBUG)
@Message(value = "Using dialect: %s", id = 35001)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@
import org.jboss.logging.Logger;

import java.lang.invoke.MethodHandles;
import java.util.Locale;

/**
* Encapsulates the validator, return type and argument type resolvers for the array_contains function.
* Subclasses only have to implement the rendering.
*/
public abstract class AbstractArrayContainsFunction extends AbstractSqmSelfRenderingFunctionDescriptor {

protected static final DeprecationLogger LOG = Logger.getMessageLogger( MethodHandles.lookup(), DeprecationLogger.class, AbstractArrayContainsFunction.class.getName() );
protected static final DeprecationLogger LOG = Logger.getMessageLogger( MethodHandles.lookup(), DeprecationLogger.class, AbstractArrayContainsFunction.class.getName(), Locale.ROOT );

protected final boolean nullable;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.jboss.logging.annotations.ValidIdRange;

import java.lang.invoke.MethodHandles;
import java.util.Locale;

import static org.jboss.logging.Logger.Level.DEBUG;
import static org.jboss.logging.Logger.Level.TRACE;
Expand All @@ -36,7 +37,8 @@ public interface NaturalIdLogging extends BasicLogger {
NaturalIdLogging NATURAL_ID_LOGGER = Logger.getMessageLogger(
MethodHandles.lookup(),
NaturalIdLogging.class,
LOGGER_NAME
LOGGER_NAME,
Locale.ROOT
);

@LogMessage(level = TRACE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.jboss.logging.annotations.ValidIdRange;

import java.lang.invoke.MethodHandles;
import java.util.Locale;

import static org.jboss.logging.Logger.Level.DEBUG;
import static org.jboss.logging.Logger.Level.TRACE;
Expand All @@ -33,7 +34,7 @@
public interface PersistenceContextLogging extends BasicLogger {
String NAME = SubSystemLogging.BASE + ".persistenceContext";

PersistenceContextLogging PERSISTENCE_CONTEXT_LOGGER = Logger.getMessageLogger( MethodHandles.lookup(), PersistenceContextLogging.class, NAME );
PersistenceContextLogging PERSISTENCE_CONTEXT_LOGGER = Logger.getMessageLogger( MethodHandles.lookup(), PersistenceContextLogging.class, NAME, Locale.ROOT );

@LogMessage(level = TRACE)
@Message("Setting proxy identifier: %s")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import org.jboss.logging.annotations.MessageLogger;

import java.lang.invoke.MethodHandles;
import java.util.Locale;

import static org.jboss.logging.Logger.Level.DEBUG;

Expand All @@ -23,7 +24,7 @@
public interface SessionMetricsLogger extends BasicLogger {
String LOGGER_NAME = "org.hibernate.session.metrics";

SessionMetricsLogger SESSION_METRICS_LOGGER = Logger.getMessageLogger( MethodHandles.lookup(), SessionMetricsLogger.class, LOGGER_NAME );
SessionMetricsLogger SESSION_METRICS_LOGGER = Logger.getMessageLogger( MethodHandles.lookup(), SessionMetricsLogger.class, LOGGER_NAME, Locale.ROOT );

@LogMessage(level = DEBUG)
@Message(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import org.jboss.logging.annotations.ValidIdRange;

import java.lang.invoke.MethodHandles;
import java.util.Locale;

import static org.jboss.logging.Logger.Level.TRACE;

Expand All @@ -26,7 +27,7 @@
@Internal
public interface VersionLogger extends BasicLogger {
String LOGGER_NAME = SubSystemLogging.BASE + ".versioning";
VersionLogger INSTANCE = Logger.getMessageLogger( MethodHandles.lookup(), VersionLogger.class, LOGGER_NAME );
VersionLogger INSTANCE = Logger.getMessageLogger( MethodHandles.lookup(), VersionLogger.class, LOGGER_NAME, Locale.ROOT );

@LogMessage(level = TRACE)
@Message(value = "Seeding version: %s", id = 160001)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import java.lang.invoke.MethodHandles;
import java.sql.SQLException;
import java.util.Locale;

import static org.jboss.logging.Logger.Level.DEBUG;
import static org.jboss.logging.Logger.Level.INFO;
Expand All @@ -39,7 +40,7 @@
public interface JdbcLogging extends BasicLogger {
String NAME = SubSystemLogging.BASE + ".jdbc";

JdbcLogging JDBC_LOGGER = Logger.getMessageLogger( MethodHandles.lookup(), JdbcLogging.class, NAME );
JdbcLogging JDBC_LOGGER = Logger.getMessageLogger( MethodHandles.lookup(), JdbcLogging.class, NAME, Locale.ROOT );

@LogMessage(level = WARN)
@Message(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.jboss.logging.annotations.ValidIdRange;

import java.lang.invoke.MethodHandles;
import java.util.Locale;

import static org.jboss.logging.Logger.Level.INFO;
import static org.jboss.logging.Logger.Level.TRACE;
Expand All @@ -35,7 +36,7 @@
public interface JdbcBatchLogging extends BasicLogger {
String NAME = "org.hibernate.orm.jdbc.batch";

JdbcBatchLogging BATCH_MESSAGE_LOGGER = Logger.getMessageLogger( MethodHandles.lookup(), JdbcBatchLogging.class, NAME );
JdbcBatchLogging BATCH_MESSAGE_LOGGER = Logger.getMessageLogger( MethodHandles.lookup(), JdbcBatchLogging.class, NAME, Locale.ROOT );

@LogMessage(level = INFO)
@Message(id=100501, value = "Automatic JDBC statement batching enabled (maximum batch size %s)")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import org.jboss.logging.annotations.ValidIdRange;

import java.lang.invoke.MethodHandles;
import java.util.Locale;

import static org.jboss.logging.Logger.Level.INFO;
import static org.jboss.logging.Logger.Level.WARN;
Expand All @@ -29,7 +30,7 @@
@ValidIdRange(min = 102001, max = 102100)
interface ConnectionProviderLogging {
String NAME = SubSystemLogging.BASE + ".connection";
ConnectionProviderLogging CONNECTION_PROVIDER_LOGGER = Logger.getMessageLogger( MethodHandles.lookup(), ConnectionProviderLogging.class, NAME );
ConnectionProviderLogging CONNECTION_PROVIDER_LOGGER = Logger.getMessageLogger( MethodHandles.lookup(), ConnectionProviderLogging.class, NAME, Locale.ROOT );

@LogMessage(level = WARN)
@Message(id = 102001,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import org.jboss.logging.annotations.ValidIdRange;

import java.lang.invoke.MethodHandles;
import java.util.Locale;

import static org.jboss.logging.Logger.Level.DEBUG;

Expand All @@ -34,7 +35,7 @@ public interface LobCreationLogging extends BasicLogger {
String NAME = JdbcLogging.NAME + ".lob";

Logger LOB_LOGGER = Logger.getLogger( NAME );
LobCreationLogging LOB_MESSAGE_LOGGER = Logger.getMessageLogger( MethodHandles.lookup(), LobCreationLogging.class, NAME );
LobCreationLogging LOB_MESSAGE_LOGGER = Logger.getMessageLogger( MethodHandles.lookup(), LobCreationLogging.class, NAME, Locale.ROOT );

@LogMessage(level = DEBUG)
@Message(value = "Disabling contextual LOB creation as %s is true", id = 10010001)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import java.lang.invoke.MethodHandles;
import java.sql.SQLException;
import java.util.Locale;

import static org.jboss.logging.Logger.Level.DEBUG;
import static org.jboss.logging.Logger.Level.WARN;
Expand All @@ -30,8 +31,8 @@ public interface SQLExceptionLogging extends BasicLogger {
String ERROR_NAME = SubSystemLogging.BASE + ".jdbc.error";
String WARN_NAME = SubSystemLogging.BASE + ".jdbc.warn";

SQLExceptionLogging ERROR_LOG = Logger.getMessageLogger( MethodHandles.lookup(), SQLExceptionLogging.class, ERROR_NAME );
SQLExceptionLogging WARNING_LOG = Logger.getMessageLogger( MethodHandles.lookup(), SQLExceptionLogging.class, WARN_NAME );
SQLExceptionLogging ERROR_LOG = Logger.getMessageLogger( MethodHandles.lookup(), SQLExceptionLogging.class, ERROR_NAME, Locale.ROOT );
SQLExceptionLogging WARNING_LOG = Logger.getMessageLogger( MethodHandles.lookup(), SQLExceptionLogging.class, WARN_NAME, Locale.ROOT );

@LogMessage(level = WARN)
@Message(value = "ErrorCode: %s, SQLState: %s", id = 247)
Expand Down
Loading