HHH-13547 - remove logging of BatchImpl rethrown exceptions
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
This commit is contained in:
parent
3f9c364232
commit
acfc79303c
|
@ -15,8 +15,8 @@ import org.jboss.logging.annotations.Message;
|
||||||
import org.jboss.logging.annotations.MessageLogger;
|
import org.jboss.logging.annotations.MessageLogger;
|
||||||
import org.jboss.logging.annotations.ValidIdRange;
|
import org.jboss.logging.annotations.ValidIdRange;
|
||||||
|
|
||||||
import static org.jboss.logging.Logger.Level.ERROR;
|
|
||||||
import static org.jboss.logging.Logger.Level.INFO;
|
import static org.jboss.logging.Logger.Level.INFO;
|
||||||
|
import static org.jboss.logging.Logger.Level.WARN;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sub-system logging related to JDBC batch execution
|
* Sub-system logging related to JDBC batch execution
|
||||||
|
@ -35,11 +35,7 @@ public interface JdbcBatchLogging extends BasicLogger {
|
||||||
Logger BATCH_LOGGER = Logger.getLogger( NAME );
|
Logger BATCH_LOGGER = Logger.getLogger( NAME );
|
||||||
JdbcBatchLogging BATCH_MESSAGE_LOGGER = Logger.getMessageLogger( JdbcBatchLogging.class, NAME );
|
JdbcBatchLogging BATCH_MESSAGE_LOGGER = Logger.getMessageLogger( JdbcBatchLogging.class, NAME );
|
||||||
|
|
||||||
@LogMessage(level = ERROR)
|
@LogMessage(level = WARN)
|
||||||
@Message(id = 100501, value = "Exception executing batch [%s], SQL: %s")
|
|
||||||
void unableToExecuteBatch(Exception e, String sql );
|
|
||||||
|
|
||||||
@LogMessage(level = ERROR)
|
|
||||||
@Message(id = 100502, value = "Unable to release batch statement...")
|
@Message(id = 100502, value = "Unable to release batch statement...")
|
||||||
void unableToReleaseBatchStatement();
|
void unableToReleaseBatchStatement();
|
||||||
|
|
||||||
|
|
|
@ -290,12 +290,10 @@ public class BatchImpl implements Batch {
|
||||||
}
|
}
|
||||||
catch (SQLException e) {
|
catch (SQLException e) {
|
||||||
abortBatch( e );
|
abortBatch( e );
|
||||||
BATCH_MESSAGE_LOGGER.unableToExecuteBatch( e, sql );
|
|
||||||
throw sqlExceptionHelper.convert( e, "could not execute batch", sql );
|
throw sqlExceptionHelper.convert( e, "could not execute batch", sql );
|
||||||
}
|
}
|
||||||
catch (RuntimeException re) {
|
catch (RuntimeException re) {
|
||||||
abortBatch( re );
|
abortBatch( re );
|
||||||
BATCH_MESSAGE_LOGGER.unableToExecuteBatch( re, sql );
|
|
||||||
throw re;
|
throw re;
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
Loading…
Reference in New Issue