Package org.apache.ibatis.logging.jdbc
Class StatementLogger
- java.lang.Object
-
- org.apache.ibatis.logging.jdbc.BaseJdbcLogger
-
- org.apache.ibatis.logging.jdbc.StatementLogger
-
- All Implemented Interfaces:
InvocationHandler
public final class StatementLogger extends BaseJdbcLogger implements InvocationHandler
Statement 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 Statement
getStatement()
return the wrapped statement.Object
invoke(Object proxy, Method method, Object[] params)
static Statement
newInstance(Statement stmt, Log statementLog, int queryStack)
Creates a logging version of a Statement.-
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:
invoke
in interfaceInvocationHandler
- Throws:
Throwable
-
newInstance
public static Statement newInstance(Statement stmt, Log statementLog, int queryStack)
Creates a logging version of a Statement.- Parameters:
stmt
- the statementstatementLog
- the statement logqueryStack
- the query stack- Returns:
- the proxy
-
getStatement
public Statement getStatement()
return the wrapped statement.- Returns:
- the statement
-
-