Package org.jdbi.v3.core.statement
Class Slf4JSqlLogger
java.lang.Object
org.jdbi.v3.core.statement.Slf4JSqlLogger
- All Implemented Interfaces:
- SqlLogger
Simple 
SqlLogger that emits some diagnostic information about
 Jdbi usage. Usually you shouldn't log every database statement made but
 it can be helpful for debugging.- 
Field SummaryFields inherited from interface org.jdbi.v3.core.statement.SqlLoggerNOP_SQL_LOGGER
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidlogAfterExecution(StatementContext context) Will be called after a query has been executed.voidlogException(StatementContext context, SQLException ex) Will be called after a query has failed.Methods inherited from class java.lang.Objectequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jdbi.v3.core.statement.SqlLoggerlogBeforeExecution
- 
Constructor Details- 
Slf4JSqlLoggerpublic Slf4JSqlLogger()
- 
Slf4JSqlLoggerpublic Slf4JSqlLogger(org.slf4j.Logger log) 
 
- 
- 
Method Details- 
logAfterExecutionDescription copied from interface:SqlLoggerWill be called after a query has been executed. TheStatementContextwill contain a startStatementContext.getExecutionMoment()and endStatementContext.getCompletionMoment()time.- Specified by:
- logAfterExecutionin interface- SqlLogger
- Parameters:
- context- the statement context
 
- 
logExceptionDescription copied from interface:SqlLoggerWill be called after a query has failed. TheStatementContextwill contain a startStatementContext.getExecutionMoment()and failureStatementContext.getExceptionMoment()time.- Specified by:
- logExceptionin interface- SqlLogger
- Parameters:
- context- the statement context
- ex- the exception
 
 
-