Package org.apache.ibatis.logging.jdbc
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
 
 
- 
- 
Field Summary
- 
Fields inherited from class org.apache.ibatis.logging.jdbc.BaseJdbcLogger
EXECUTE_METHODS, queryStack, SET_METHODS, statementLog 
 - 
 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ConnectiongetConnection()return the wrapped connection.Objectinvoke(Object proxy, Method method, Object[] params)static ConnectionnewInstance(Connection conn, Log statementLog, int queryStack)Creates a logging version of a connection.- 
Methods inherited from class org.apache.ibatis.logging.jdbc.BaseJdbcLogger
clearColumnInfo, debug, getColumn, getColumnString, getParameterValueString, isDebugEnabled, isTraceEnabled, objectValueString, removeExtraWhitespace, setColumn, trace 
 - 
 
 - 
 
- 
- 
Method Detail
- 
invoke
public Object invoke(Object proxy, Method method, Object[] params) throws Throwable
- Specified by:
 invokein interfaceInvocationHandler- Throws:
 Throwable
 
- 
newInstance
public static Connection newInstance(Connection conn, Log statementLog, int queryStack)
Creates a logging version of a connection.- Parameters:
 conn- the original connectionstatementLog- the statement logqueryStack- the query stack- Returns:
 - the connection with logging
 
 
- 
getConnection
public Connection getConnection()
return the wrapped connection.- Returns:
 - the connection
 
 
 - 
 
 -