Skip to content

Commit a0162f3

Browse files
committed
HHH-13547 - remove logging of BatchImpl rethrown exceptions
Signed-off-by: Jan Schatteman <[email protected]>
1 parent d5102ff commit a0162f3

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

hibernate-core/src/main/java/org/hibernate/engine/jdbc/batch/JdbcBatchLogging.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515

1616
import java.lang.invoke.MethodHandles;
1717

18-
import static org.jboss.logging.Logger.Level.ERROR;
1918
import static org.jboss.logging.Logger.Level.INFO;
19+
import static org.jboss.logging.Logger.Level.WARN;
2020

2121
/**
2222
* Sub-system logging related to JDBC batch execution
@@ -35,11 +35,7 @@ public interface JdbcBatchLogging extends BasicLogger {
3535
Logger BATCH_LOGGER = Logger.getLogger( NAME );
3636
JdbcBatchLogging BATCH_MESSAGE_LOGGER = Logger.getMessageLogger( MethodHandles.lookup(), JdbcBatchLogging.class, NAME );
3737

38-
@LogMessage(level = ERROR)
39-
@Message(id = 100501, value = "Exception executing batch [%s], SQL: %s")
40-
void unableToExecuteBatch(Exception e, String sql );
41-
42-
@LogMessage(level = ERROR)
38+
@LogMessage(level = WARN)
4339
@Message(id = 100502, value = "Unable to release batch statement...")
4440
void unableToReleaseBatchStatement();
4541

hibernate-core/src/main/java/org/hibernate/engine/jdbc/batch/internal/BatchImpl.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,12 +302,10 @@ protected void performExecution() {
302302
}
303303
catch (SQLException e) {
304304
abortBatch( e );
305-
BATCH_MESSAGE_LOGGER.unableToExecuteBatch( e, sql );
306305
throw sqlExceptionHelper.convert( e, "could not execute batch", sql );
307306
}
308307
catch (RuntimeException re) {
309308
abortBatch( re );
310-
BATCH_MESSAGE_LOGGER.unableToExecuteBatch( re, sql );
311309
throw re;
312310
}
313311
} );

0 commit comments

Comments
 (0)