public class SqlStatementLogger extends Object
Constructor and Description |
---|
SqlStatementLogger()
Constructs a new SqlStatementLogger instance.
|
SqlStatementLogger(boolean logToStdout,
boolean format)
Constructs a new SqlStatementLogger instance.
|
Modifier and Type | Method and Description |
---|---|
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)
Log a SQL statement string using the specified formatter
|
void |
setFormat(boolean format) |
void |
setLogToStdout(boolean logToStdout)
Enable (true) or disable (false) logging to stdout.
|
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 loggingpublic 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.Copyright © 2017 JBoss by Red Hat. All rights reserved.