Skip to content

Commit 1901167

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

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
import org.jboss.logging.annotations.MessageLogger;
1616
import org.jboss.logging.annotations.ValidIdRange;
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( 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
@@ -290,12 +290,10 @@ protected void performExecution() {
290290
}
291291
catch (SQLException e) {
292292
abortBatch( e );
293-
BATCH_MESSAGE_LOGGER.unableToExecuteBatch( e, sql );
294293
throw sqlExceptionHelper.convert( e, "could not execute batch", sql );
295294
}
296295
catch (RuntimeException re) {
297296
abortBatch( re );
298-
BATCH_MESSAGE_LOGGER.unableToExecuteBatch( re, sql );
299297
throw re;
300298
}
301299
} );

0 commit comments

Comments
 (0)