Skip to content

[2.4] Avoid creation of log at runtime #2185

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 7, 2025
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@

public interface ReactiveGlobalTemporaryTableStrategy {

Log LOG = make( Log.class, lookup() );

static String sessionIdentifier(SharedSessionContractImplementor session) {
return session.getSessionIdentifier().toString();
}
Expand Down Expand Up @@ -64,7 +66,7 @@ default void prepare(MappingModelCreationProcess mappingModelCreationProcess, Jd
tableCreatedStage.complete( null );
}
else {
make( Log.class, lookup() ).debugf( "Creating global-temp ID table : %s", getTemporaryTable().getTableExpression() );
LOG.debugf( "Creating global-temp ID table : %s", getTemporaryTable().getTableExpression() );

connectionStage()
.thenCompose( this::createTable )
Expand Down Expand Up @@ -102,7 +104,7 @@ private CompletionStage<Void> releaseConnection(ReactiveConnection connection) {

private static void logConnectionClosedError(Throwable t) {
if ( t != null ) {
make( Log.class, lookup() ).debugf( "Ignoring error closing the connection: %s", t.getMessage() );
LOG.debugf( "Ignoring error closing the connection: %s", t.getMessage() );
}
}

Expand Down Expand Up @@ -150,7 +152,7 @@ default void release(
setDropIdTables( false );

final TemporaryTable temporaryTable = getTemporaryTable();
make( Log.class, lookup() ).debugf( "Dropping global-tempk ID table : %s", temporaryTable.getTableExpression() );
LOG.debugf( "Dropping global-temp ID table : %s", temporaryTable.getTableExpression() );

connectionStage()
.thenCompose( this::dropTable )
Expand Down
Loading