public interface SpyLogDelegator
| Modifier and Type | Method and Description |
|---|---|
void |
connectionClosed(Spy spy)
Called whenever a connection spy is closed.
|
void |
connectionOpened(Spy spy)
Called whenever a new connection spy is created.
|
void |
constructorReturned(Spy spy,
java.lang.String constructionInfo)
Called when a spied upon object is constructed.
|
void |
debug(java.lang.String msg)
Log a Setup and/or administrative log message for log4jdbc.
|
void |
exceptionOccured(Spy spy,
java.lang.String methodCall,
java.lang.Exception e,
java.lang.String sql,
long execTime)
Called when a spied upon method throws an Exception.
|
boolean |
isJdbcLoggingEnabled()
Determine if any of the jdbc or sql loggers are turned on.
|
void |
methodReturned(Spy spy,
java.lang.String methodCall,
java.lang.String returnMsg)
Called when spied upon method call returns.
|
void |
sqlOccured(Spy spy,
java.lang.String methodCall,
java.lang.String sql)
Special call that is called only for JDBC method calls that contain SQL.
|
void |
sqlTimingOccured(Spy spy,
long execTime,
java.lang.String methodCall,
java.lang.String sql)
Similar to sqlOccured, but reported after SQL executes and used to report timing stats on the SQL
|
boolean isJdbcLoggingEnabled()
void exceptionOccured(Spy spy, java.lang.String methodCall, java.lang.Exception e, java.lang.String sql, long execTime)
spy - the Spy wrapping the class that threw an Exception.methodCall - a description of the name and call parameters of the method generated the Exception.e - the Exception that was thrown.sql - optional sql that occured just before the exception occured.execTime - optional amount of time that passed before an exception was thrown when sql was being executed.
caller should pass -1 if not usedvoid methodReturned(Spy spy, java.lang.String methodCall, java.lang.String returnMsg)
spy - the Spy wrapping the class that called the method that returned.methodCall - a description of the name and call parameters of the method that returned.returnMsg - return value converted to a String for integral types, or String representation for Object
return types this will be null for void return types.void constructorReturned(Spy spy, java.lang.String constructionInfo)
spy - the Spy wrapping the class that called the method that returned.constructionInfo - information about the object constructionvoid sqlOccured(Spy spy, java.lang.String methodCall, java.lang.String sql)
spy - the Spy wrapping the class where the SQL occured.methodCall - a description of the name and call parameters of the method that generated the SQL.sql - sql that occured.void sqlTimingOccured(Spy spy, long execTime, java.lang.String methodCall, java.lang.String sql)
spy - the Spy wrapping the class where the SQL occured.execTime - how long it took the sql to run, in msec.methodCall - a description of the name and call parameters of the method that generated the SQL.sql - sql that occured.void connectionOpened(Spy spy)
spy - ConnectionSpy that was created.void connectionClosed(Spy spy)
spy - ConnectionSpy that was closed.void debug(java.lang.String msg)
msg - message to log.