SQLLog.BatchLogger
Constructor and Description |
---|
FormattedLog() |
Modifier and Type | Method and Description |
---|---|
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
|
protected abstract boolean isEnabled()
protected abstract void log(String msg)
msg
- the message to logpublic final SQLLog.BatchLogger logBatch()
SQLLog
public void logBeginTransaction(Handle h)
SQLLog
logBeginTransaction
in interface SQLLog
public void logCheckpointTransaction(Handle h, String name)
SQLLog
logCheckpointTransaction
in interface SQLLog
name
- the checkpoint namepublic 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 SQLLog
sql
- The sql for the prepared batchcount
- the number of elements in the prepared batchpublic void logReleaseCheckpointTransaction(Handle h, String name)
SQLLog
logReleaseCheckpointTransaction
in interface SQLLog
name
- 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
Copyright © 2018. All rights reserved.