|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.engine.jdbc.spi.SqlStatementLogger
public class SqlStatementLogger
Centralize logging for SQL statements.
Constructor Summary | |
---|---|
SqlStatementLogger()
Constructs a new SqlStatementLogger instance. |
|
SqlStatementLogger(boolean logToStdout,
boolean format)
Constructs a new SqlStatementLogger instance. |
Method Summary | |
---|---|
boolean |
isFormat()
|
boolean |
isLogToStdout()
Are we currently logging to stdout? |
void |
logStatement(String statement)
Log a SQL statement string. |
void |
logStatement(String statement,
Formatter formatter)
|
void |
setFormat(boolean format)
|
void |
setLogToStdout(boolean logToStdout)
Enable (true) or disable (false) logging to stdout. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SqlStatementLogger()
public SqlStatementLogger(boolean logToStdout, boolean format)
logToStdout
- Should we log to STDOUT in addition to our internal logger.format
- Should we format the statements prior to loggingMethod Detail |
---|
public boolean isLogToStdout()
public void setLogToStdout(boolean logToStdout)
logToStdout
- True to enable logging to stdout; false to disable.public boolean isFormat()
public void setFormat(boolean format)
public void logStatement(String statement)
statement
- The SQL statement.public void logStatement(String statement, Formatter formatter)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |