Class ConnectionLogger

java.lang.Object
org.apache.ibatis.logging.jdbc.BaseJdbcLogger
org.apache.ibatis.logging.jdbc.ConnectionLogger
All Implemented Interfaces:
InvocationHandler

public final class ConnectionLogger extends BaseJdbcLogger implements InvocationHandler
Connection proxy to add logging.
Author:
Clinton Begin, Eduardo Macarron
  • Method Details

    • invoke

      public Object invoke(Object proxy, Method method, Object[] params) throws Throwable
      Specified by:
      invoke in interface InvocationHandler
      Throws:
      Throwable
    • newInstance

      public static Connection newInstance(Connection conn, Log statementLog, int queryStack)
      Creates a logging version of a connection.
      Parameters:
      conn - the original connection
      statementLog - the statement log
      queryStack - the query stack
      Returns:
      the connection with logging
    • getConnection

      public Connection getConnection()
      return the wrapped connection.
      Returns:
      the connection