org.skife.jdbi.v2.logging
Class PrintStreamLog

java.lang.Object
  extended by org.skife.jdbi.v2.logging.FormattedLog
      extended by org.skife.jdbi.v2.logging.PrintStreamLog
All Implemented Interfaces:
SQLLog

public class PrintStreamLog
extends FormattedLog


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.skife.jdbi.v2.tweak.SQLLog
SQLLog.BatchLogger
 
Constructor Summary
PrintStreamLog()
          Log to standard out.
PrintStreamLog(PrintStream out)
          Specify the print stream to log to
 
Method Summary
protected  boolean isEnabled()
          Used to ask implementations if logging is enabled.
protected  void log(String msg)
          Log the statement passed in
 
Methods inherited from class org.skife.jdbi.v2.logging.FormattedLog
logBatch, logBeginTransaction, logCheckpointTransaction, logCommitTransaction, logObtainHandle, logPreparedBatch, logReleaseCheckpointTransaction, logReleaseHandle, logRollbackToCheckpoint, logRollbackTransaction, logSQL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrintStreamLog

public PrintStreamLog()
Log to standard out.


PrintStreamLog

public PrintStreamLog(PrintStream out)
Specify the print stream to log to

Parameters:
out - The print stream to log to
Method Detail

isEnabled

protected final boolean isEnabled()
Description copied from class: FormattedLog
Used to ask implementations if logging is enabled.

Specified by:
isEnabled in class FormattedLog
Returns:
true if statement logging is enabled

log

protected void log(String msg)
Description copied from class: FormattedLog
Log the statement passed in

Specified by:
log in class FormattedLog
Parameters:
msg - the message to log


Copyright © 2011. All Rights Reserved.