|
log4jdbc4 1.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface SpyLogDelegator
Delegates Spy events to a logger. This interface is used for all logging activity used by log4jdbc and hides the specific implementation of any given logging system from log4jdbc.

| Method Summary | |
|---|---|
void |
constructorReturned(Spy spy,
String constructionInfo)
Called when a spied upon object is constructed. |
void |
debug(String msg)
Log a Setup and/or administrative log message for log4jdbc. |
void |
exceptionOccured(Spy spy,
String methodCall,
Exception e,
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,
String methodCall,
String returnMsg)
Called when spied upon method call returns. |
void |
sqlOccured(Spy spy,
String methodCall,
String sql)
Special call that is called only for JDBC method calls that contain SQL. |
void |
sqlTimingOccured(Spy spy,
long execTime,
String methodCall,
String sql)
Similar to sqlOccured, but reported after SQL executes and used to report timing stats on the SQL |
| Method Detail |
|---|
boolean isJdbcLoggingEnabled()
void exceptionOccured(Spy spy,
String methodCall,
Exception e,
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 used
void methodReturned(Spy spy,
String methodCall,
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,
String constructionInfo)
spy - the Spy wrapping the class that called the method that returned.constructionInfo - information about the object construction
void sqlOccured(Spy spy,
String methodCall,
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,
String methodCall,
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 debug(String msg)
msg - message to log.
|
log4jdbc4 1.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||