Interface JdbcLogger

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 Details

    • logDaoMethodEntering

      void logDaoMethodEntering(String callerClassName, String callerMethodName, Object... args)
      Logs the start of a DAO method.
      Parameters:
      callerClassName - the name of the DAO class
      callerMethodName - the name of the DAO method
      args - the arguments of the DAO method
    • logDaoMethodExiting

      void logDaoMethodExiting(String callerClassName, String callerMethodName, Object result)
      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 class
      callerMethodName - the name of the DAO method
      result - the method result or null if the method return type is void
    • logDaoMethodThrowing

      void logDaoMethodThrowing(String callerClassName, String callerMethodName, RuntimeException e)
      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 class
      callerMethodName - the name of the DAO method
      e - the runtime exception
    • logSqlExecutionSkipping

      void logSqlExecutionSkipping(String callerClassName, String callerMethodName, SqlExecutionSkipCause cause)
      Logs a skip of an SQL execution.
      Parameters:
      callerClassName - the caller class name
      callerMethodName - the caller method name
      cause - the cause of the skip
    • logSql

      void logSql(String callerClassName, String callerMethodName, Sql<?> sql)
      Logs an SQL statement.
      Parameters:
      callerClassName - the caller class name
      callerMethodName - the caller method name
      sql - SQL
    • logTransactionBegun

      void logTransactionBegun(String callerClassName, String callerMethodName, String transactionId)
      Logs a beginning of a transaction.
      Parameters:
      callerClassName - the caller class name
      callerMethodName - the caller method name
      transactionId - the transaction id
    • logTransactionEnded

      void logTransactionEnded(String callerClassName, String callerMethodName, String transactionId)
      Logs an end of a transaction.
      Parameters:
      callerClassName - the caller class name
      callerMethodName - the caller method name
      transactionId - the transaction id
    • logTransactionCommitted

      void logTransactionCommitted(String callerClassName, String callerMethodName, String transactionId)
      Logs a commit of a transaction.
      Parameters:
      callerClassName - the caller class name
      callerMethodName - the caller method name
      transactionId - 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 name
      callerMethodName - the caller method name
      transactionId - the transaction id
      savepointName - the save point name
    • logTransactionRolledback

      void logTransactionRolledback(String callerClassName, String callerMethodName, String transactionId)
      Logs a rollback of a transaction.
      Parameters:
      callerClassName - the caller class name
      callerMethodName - the caller method name
      transactionId - 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 name
      callerMethodName - the caller method name
      transactionId - the transaction id
      savepointName - 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 name
      callerMethodName - the caller method name
      transactionId - the transaction id
      savepointName - 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 name
      callerMethodName - the caller method name
      transactionId - the transaction id
      e - the cause of the failure
    • logAutoCommitEnablingFailure

      void logAutoCommitEnablingFailure(String callerClassName, String callerMethodName, SQLException e)
      Logs a failure of an auto commit enabling.
      Parameters:
      callerClassName - the caller class name
      callerMethodName - the caller method name
      e - 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 name
      callerMethodName - the caller method name
      transactionIsolationLevel - the transaction isolation level
      e - the cause of the failure
      See Also:
    • logConnectionClosingFailure

      void logConnectionClosingFailure(String callerClassName, String callerMethodName, SQLException e)
      Logs a failure of a connection close.
      Parameters:
      callerClassName - the caller class name
      callerMethodName - the caller method name
      e - the cause of the failure
      See Also:
    • logStatementClosingFailure

      void logStatementClosingFailure(String callerClassName, String callerMethodName, SQLException e)
      Logs a failure of a statement close.
      Parameters:
      callerClassName - the caller class name
      callerMethodName - the caller method name
      e - the cause of the failure
      See Also:
    • logResultSetClosingFailure

      void logResultSetClosingFailure(String callerClassName, String callerMethodName, SQLException e)
      Logs a failure of a result set close.
      Parameters:
      callerClassName - the caller class name
      callerMethodName - the caller method name
      e - the cause of the failure
      See Also: