|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.skife.jdbi.v2.logging.FormattedLog
public abstract class FormattedLog
Convenience class which handles log statement formatting
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.skife.jdbi.v2.tweak.SQLLog |
|---|
SQLLog.BatchLogger |
| Constructor Summary | |
|---|---|
FormattedLog()
|
|
| Method Summary | |
|---|---|
protected abstract boolean |
isEnabled()
Used to ask implementations if logging is enabled. |
protected abstract void |
log(String msg)
Log the statement passed in |
SQLLog.BatchLogger |
logBatch()
Factory method used to obtain a SQLLog.BatchLogger which will be used to log a specific batch statement. |
void |
logBeginTransaction(Handle h)
Called when a transaction is started |
void |
logCheckpointTransaction(Handle h,
String name)
Called when a transaction is checkpointed |
void |
logCommitTransaction(long time,
Handle h)
Called when a transaction is committed |
void |
logObtainHandle(long time,
Handle h)
Called when a handle is opened from a DBI instance |
void |
logPreparedBatch(long time,
String sql,
int count)
Called to log a prepared batch execution |
void |
logReleaseCheckpointTransaction(Handle h,
String name)
Called when a transaction checkpoint is released |
void |
logReleaseHandle(Handle h)
Called when a handle is closed |
void |
logRollbackToCheckpoint(long time,
Handle h,
String checkpointName)
Called when a transaction checkpoint is rolled back to |
void |
logRollbackTransaction(long time,
Handle h)
Called when a transaction is committed |
void |
logSQL(long time,
String sql)
Called to log typical sql statements |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FormattedLog()
| Method Detail |
|---|
protected abstract boolean isEnabled()
protected abstract void log(String msg)
msg - the message to logpublic final SQLLog.BatchLogger logBatch()
SQLLog
logBatch in interface SQLLogpublic void logBeginTransaction(Handle h)
SQLLog
logBeginTransaction in interface SQLLog
public void logCheckpointTransaction(Handle h,
String name)
SQLLog
logCheckpointTransaction in interface SQLLogname - the checkpoint name
public void logCommitTransaction(long time,
Handle h)
SQLLog
logCommitTransaction in interface SQLLog
public void logObtainHandle(long time,
Handle h)
SQLLog
logObtainHandle in interface SQLLog
public final void logPreparedBatch(long time,
String sql,
int count)
SQLLog
logPreparedBatch in interface SQLLogsql - The sql for the prepared batchcount - the number of elements in the prepared batch
public void logReleaseCheckpointTransaction(Handle h,
String name)
SQLLog
logReleaseCheckpointTransaction in interface SQLLogname - the checkpoint namepublic void logReleaseHandle(Handle h)
SQLLog
logReleaseHandle in interface SQLLog
public void logRollbackToCheckpoint(long time,
Handle h,
String checkpointName)
SQLLog
logRollbackToCheckpoint in interface SQLLog
public void logRollbackTransaction(long time,
Handle h)
SQLLog
logRollbackTransaction in interface SQLLog
public final void logSQL(long time,
String sql)
SQLLog
logSQL in interface SQLLogsql - the actual sql being exected
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||