public class ErrorLoggingEventListener extends LoggingEventListener
LoggingEventListener
and only logs if an exception has occurred.
To activate this class, add com.p6spy.engine.logging.ErrorLoggingEventListener
to the file
src/main/resources/META-INF/services/com.p6spy.engine.logging.LoggingEventListener
.
INSTANCE
Constructor and Description |
---|
ErrorLoggingEventListener() |
Modifier and Type | Method and Description |
---|---|
protected void |
logElapsed(Loggable loggable,
long timeElapsedNanos,
Category category,
java.sql.SQLException e) |
onAfterAnyAddBatch, onAfterAnyExecute, onAfterCommit, onAfterExecuteBatch, onAfterGetResultSet, onAfterResultSetClose, onAfterResultSetGet, onAfterResultSetGet, onAfterResultSetNext, onAfterRollback, onBeforeResultSetNext
onAfterAddBatch, onAfterAddBatch, onAfterExecute, onAfterExecute, onAfterExecuteQuery, onAfterExecuteQuery, onAfterExecuteUpdate, onAfterExecuteUpdate, onBeforeAddBatch, onBeforeAddBatch, onBeforeAnyAddBatch, onBeforeAnyExecute, onBeforeExecute, onBeforeExecute, onBeforeExecuteBatch, onBeforeExecuteQuery, onBeforeExecuteQuery, onBeforeExecuteUpdate, onBeforeExecuteUpdate
onAfterCallableStatementSet, onAfterConnectionClose, onAfterGetConnection, onAfterPreparedStatementSet, onAfterSetAutoCommit, onAfterStatementClose, onBeforeCommit, onBeforeGetConnection, onBeforeRollback, onBeforeSetAutoCommit, onConnectionWrapped
protected void logElapsed(Loggable loggable, long timeElapsedNanos, Category category, java.sql.SQLException e)
logElapsed
in class LoggingEventListener