net.sf.log4jdbc.tools
Class Log4JdbcCustomFormatter
java.lang.Object
net.sf.log4jdbc.Slf4jSpyLogDelegator
net.sf.log4jdbc.tools.Log4JdbcCustomFormatter
- All Implemented Interfaces:
- SpyLogDelegator
public class Log4JdbcCustomFormatter
- extends Slf4jSpyLogDelegator
| Methods inherited from class net.sf.log4jdbc.Slf4jSpyLogDelegator |
connectionClosed, connectionOpened, constructorReturned, debug, exceptionOccured, getSqlOnlyLogger, isJdbcLoggingEnabled, isResultSetCollectionEnabled, isResultSetCollectionEnabledWithUnreadValueFillIn, methodReturned, resultSetCollected, sqlTimingOccured |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Log4JdbcCustomFormatter
public Log4JdbcCustomFormatter()
getMargin
public int getMargin()
setMargin
public void setMargin(int n)
sqlOccured
public String sqlOccured(Spy spy,
String methodCall,
String rawSql)
- Description copied from class:
Slf4jSpyLogDelegator
- Special call that is called only for JDBC method calls that contain SQL.
- Specified by:
sqlOccured in interface SpyLogDelegator- Overrides:
sqlOccured in class Slf4jSpyLogDelegator
- Parameters:
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.rawSql - sql that occured.
- Returns:
- the (possibly reformatted) sql
sqlOccured
public String sqlOccured(Spy spy,
String methodCall,
String[] sqls)
- Description copied from interface:
SpyLogDelegator
- Special call that is called only for JDBC method calls that contain SQL batches.
- Specified by:
sqlOccured in interface SpyLogDelegator- Overrides:
sqlOccured in class Slf4jSpyLogDelegator
- Parameters:
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.sqls - the sql batch that occured.
- Returns:
- the (possibly reformatted) sql string for the whole batch
getLoggingType
public LoggingType getLoggingType()
setLoggingType
public void setLoggingType(LoggingType loggingType)
getSqlPrefix
public String getSqlPrefix()
setSqlPrefix
public void setSqlPrefix(String sqlPrefix)
Copyright © 2012. All Rights Reserved.