public class ProfilingSpyLogDelegator extends java.lang.Object implements SpyLogDelegator
| Constructor and Description |
|---|
ProfilingSpyLogDelegator() |
ProfilingSpyLogDelegator(ProfilerProvider profilerProvider) |
| 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 s)
Called when a spied upon object is constructed.
|
void |
debug(java.lang.String s)
Log a Setup and/or administrative log message for log4jdbc.
|
void |
exceptionOccured(Spy spy,
java.lang.String s,
java.lang.Exception e,
java.lang.String s2,
long l)
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 s,
java.lang.String s2)
Called when spied upon method call returns.
|
void |
sqlOccured(Spy spy,
java.lang.String s,
java.lang.String s2)
Special call that is called only for JDBC method calls that contain SQL.
|
void |
sqlTimingOccured(Spy spy,
long time,
java.lang.String method,
java.lang.String sql)
Similar to sqlOccured, but reported after SQL executes and used to report timing stats on the SQL
|
public ProfilingSpyLogDelegator()
public ProfilingSpyLogDelegator(ProfilerProvider profilerProvider)
public boolean isJdbcLoggingEnabled()
SpyLogDelegatorisJdbcLoggingEnabled in interface SpyLogDelegatorpublic void exceptionOccured(Spy spy, java.lang.String s, java.lang.Exception e, java.lang.String s2, long l)
SpyLogDelegatorexceptionOccured in interface SpyLogDelegatorspy - the Spy wrapping the class that threw an Exception.s - a description of the name and call parameters of the method generated the Exception.e - the Exception that was thrown.s2 - optional sql that occured just before the exception occured.l - optional amount of time that passed before an exception was thrown when sql was being executed.
caller should pass -1 if not usedpublic void methodReturned(Spy spy, java.lang.String s, java.lang.String s2)
SpyLogDelegatormethodReturned in interface SpyLogDelegatorspy - the Spy wrapping the class that called the method that returned.s - a description of the name and call parameters of the method that returned.s2 - return value converted to a String for integral types, or String representation for Object
return types this will be null for void return types.public void constructorReturned(Spy spy, java.lang.String s)
SpyLogDelegatorconstructorReturned in interface SpyLogDelegatorspy - the Spy wrapping the class that called the method that returned.s - information about the object constructionpublic void sqlOccured(Spy spy, java.lang.String s, java.lang.String s2)
SpyLogDelegatorsqlOccured in interface SpyLogDelegatorspy - the Spy wrapping the class where the SQL occured.s - a description of the name and call parameters of the method that generated the SQL.s2 - sql that occured.public void sqlTimingOccured(Spy spy, long time, java.lang.String method, java.lang.String sql)
SpyLogDelegatorsqlTimingOccured in interface SpyLogDelegatorspy - the Spy wrapping the class where the SQL occured.time - how long it took the sql to run, in msec.method - a description of the name and call parameters of the method that generated the SQL.sql - sql that occured.public void connectionOpened(Spy spy)
SpyLogDelegatorconnectionOpened in interface SpyLogDelegatorspy - ConnectionSpy that was created.public void connectionClosed(Spy spy)
SpyLogDelegatorconnectionClosed in interface SpyLogDelegatorspy - ConnectionSpy that was closed.public void debug(java.lang.String s)
SpyLogDelegatordebug in interface SpyLogDelegators - message to log.