- All Known Implementing Classes:
AbstractJdbcLogger,UtilLoggingJdbcLogger
public interface JdbcLogger
The logger interface for JDBC related operations in the Doma framework.
This interface defines methods for logging various database operations including SQL execution, transaction management, and resource handling.
The implementation instance must be thread safe.
The implementation methods must not throw any exceptions.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidlogAutoCommitEnablingFailure(String callerClassName, String callerMethodName, SQLException e) Logs a failure of an auto commit enabling.voidlogConnectionClosingFailure(String callerClassName, String callerMethodName, SQLException e) Logs a failure of a connection close.voidlogDaoMethodEntering(String callerClassName, String callerMethodName, Object... args) Logs the start of a DAO method.voidlogDaoMethodExiting(String callerClassName, String callerMethodName, Object result) Logs the normal end of a DAO method.voidlogDaoMethodThrowing(String callerClassName, String callerMethodName, RuntimeException e) Logs the abnormal end of a DAO method.voidlogResultSetClosingFailure(String callerClassName, String callerMethodName, SQLException e) Logs a failure of a result set close.voidLogs an SQL statement.voidlogSqlExecutionSkipping(String callerClassName, String callerMethodName, SqlExecutionSkipCause cause) Logs a skip of an SQL execution.voidlogStatementClosingFailure(String callerClassName, String callerMethodName, SQLException e) Logs a failure of a statement close.voidlogTransactionBegun(String callerClassName, String callerMethodName, String transactionId) Logs a beginning of a transaction.voidlogTransactionCommitted(String callerClassName, String callerMethodName, String transactionId) Logs a commit of a transaction.voidlogTransactionEnded(String callerClassName, String callerMethodName, String transactionId) Logs an end of a transaction.voidlogTransactionIsolationSettingFailure(String callerClassName, String callerMethodName, int transactionIsolationLevel, SQLException e) Logs a failure of a transaction isolation setting.voidlogTransactionRollbackFailure(String callerClassName, String callerMethodName, String transactionId, SQLException e) Logs a failure of a transaction rollback.voidlogTransactionRolledback(String callerClassName, String callerMethodName, String transactionId) Logs a rollback of a transaction.voidlogTransactionSavepointCreated(String callerClassName, String callerMethodName, String transactionId, String savepointName) Logs a creation of a save point.default voidlogTransactionSavepointReleased(String callerClassName, String callerMethodName, String transactionId, String savepointName) Logs a release of a save point.voidlogTransactionSavepointRolledback(String callerClassName, String callerMethodName, String transactionId, String savepointName) Logs a rollback of a save point.
-
Method Details
-
logDaoMethodEntering
Logs the start of a DAO method.- Parameters:
callerClassName- the name of the DAO classcallerMethodName- the name of the DAO methodargs- the arguments of the DAO method
-
logDaoMethodExiting
Logs the normal end of a DAO method.At the end of the DAO method, either this method or
logDaoMethodThrowing(String, String, RuntimeException)must be invoked.- Parameters:
callerClassName- the name of the DAO classcallerMethodName- the name of the DAO methodresult- the method result or null if the method return type isvoid
-
logDaoMethodThrowing
Logs the abnormal end of a DAO method.At the end of the DAO method, either this method or
logDaoMethodExiting(String, String, Object)must be invoked.- Parameters:
callerClassName- the name of the DAO classcallerMethodName- the name of the DAO methode- the runtime exception
-
logSqlExecutionSkipping
void logSqlExecutionSkipping(String callerClassName, String callerMethodName, SqlExecutionSkipCause cause) Logs a skip of an SQL execution.- Parameters:
callerClassName- the caller class namecallerMethodName- the caller method namecause- the cause of the skip
-
logSql
Logs an SQL statement.- Parameters:
callerClassName- the caller class namecallerMethodName- the caller method namesql- SQL
-
logTransactionBegun
Logs a beginning of a transaction.- Parameters:
callerClassName- the caller class namecallerMethodName- the caller method nametransactionId- the transaction id
-
logTransactionEnded
Logs an end of a transaction.- Parameters:
callerClassName- the caller class namecallerMethodName- the caller method nametransactionId- the transaction id
-
logTransactionCommitted
Logs a commit of a transaction.- Parameters:
callerClassName- the caller class namecallerMethodName- the caller method nametransactionId- the transaction id
-
logTransactionSavepointCreated
void logTransactionSavepointCreated(String callerClassName, String callerMethodName, String transactionId, String savepointName) Logs a creation of a save point.- Parameters:
callerClassName- the caller class namecallerMethodName- the caller method nametransactionId- the transaction idsavepointName- the save point name
-
logTransactionRolledback
void logTransactionRolledback(String callerClassName, String callerMethodName, String transactionId) Logs a rollback of a transaction.- Parameters:
callerClassName- the caller class namecallerMethodName- the caller method nametransactionId- the transaction id
-
logTransactionSavepointRolledback
void logTransactionSavepointRolledback(String callerClassName, String callerMethodName, String transactionId, String savepointName) Logs a rollback of a save point.- Parameters:
callerClassName- the caller class namecallerMethodName- the caller method nametransactionId- the transaction idsavepointName- the save point name
-
logTransactionSavepointReleased
default void logTransactionSavepointReleased(String callerClassName, String callerMethodName, String transactionId, String savepointName) Logs a release of a save point.- Parameters:
callerClassName- the caller class namecallerMethodName- the caller method nametransactionId- the transaction idsavepointName- the save point name
-
logTransactionRollbackFailure
void logTransactionRollbackFailure(String callerClassName, String callerMethodName, String transactionId, SQLException e) Logs a failure of a transaction rollback.- Parameters:
callerClassName- the caller class namecallerMethodName- the caller method nametransactionId- the transaction ide- the cause of the failure
-
logAutoCommitEnablingFailure
Logs a failure of an auto commit enabling.- Parameters:
callerClassName- the caller class namecallerMethodName- the caller method namee- the cause of the failure- See Also:
-
logTransactionIsolationSettingFailure
void logTransactionIsolationSettingFailure(String callerClassName, String callerMethodName, int transactionIsolationLevel, SQLException e) Logs a failure of a transaction isolation setting.- Parameters:
callerClassName- the caller class namecallerMethodName- the caller method nametransactionIsolationLevel- the transaction isolation levele- the cause of the failure- See Also:
-
logConnectionClosingFailure
Logs a failure of a connection close.- Parameters:
callerClassName- the caller class namecallerMethodName- the caller method namee- the cause of the failure- See Also:
-
logStatementClosingFailure
Logs a failure of a statement close.- Parameters:
callerClassName- the caller class namecallerMethodName- the caller method namee- the cause of the failure- See Also:
-
logResultSetClosingFailure
Logs a failure of a result set close.- Parameters:
callerClassName- the caller class namecallerMethodName- the caller method namee- the cause of the failure- See Also:
-