| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private final boolean | |
| private static final Logger | |
| private static final Logger | |
| private final long | logSlowQuery
Configuration value that indicates slow query. |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public | |
| public | SqlStatementLogger(boolean
Should we log to STDOUT in addition to our internal logger. logToStdout, boolean Should we format the statements in the console and log format)Constructs a new SqlStatementLogger instance. |
| public | SqlStatementLogger(boolean
Should we log to STDOUT in addition to our internal logger. logToStdout, boolean Should we format the statements in the console and log format, boolean Should we highlight the statements in the console highlight)Constructs a new SqlStatementLogger instance. |
| public | SqlStatementLogger(boolean
Should we log to STDOUT in addition to our internal logger. logToStdout, boolean Should we format the statements in the console and log format, boolean Should we highlight the statements in the console highlight, long Should we logs query which executed slower than specified milliseconds. 0 - disabled. logSlowQuery)Constructs a new SqlStatementLogger instance. |
| Modifier and Type | Method and Description |
|---|---|
| public long | |
| public boolean | |
| public boolean | Returns: True if we are currently logging to stdout; false otherwise.Are we currently logging to stdout? |
| public void | logSlowQuery(Statement
SQL statement. statement, long Start time in nanoseconds. startTimeNanos)Log a slow SQL query |
| public void | logSlowQuery(String
The SQL query. sql, long Start time in nanoseconds. startTimeNanos)Log a slow SQL query |
| public void | |
| public void | logStatement(String
The SQL statement. statement, Formatter The formatter to use. formatter)Log a SQL statement string using the specified formatter |
| public void | setFormat(boolean format)
Deprecated
Will likely be removed:
Should either become immutable or threadsafe.
|
| public void | setLogToStdout(boolean
True to enable logging to stdout; false to disable. logToStdout)
Deprecated
Will likely be removed:
Should either become immutable or threadsafe.
Enable (true) or disable (false) logging to stdout.
|
| format | back to summary |
|---|---|
| private boolean format | |
| highlight | back to summary |
|---|---|
| private final boolean highlight | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| LOG_SLOW | back to summary |
|---|---|
| private static final Logger LOG_SLOW | |
| logSlowQuery | back to summary |
|---|---|
| private final long logSlowQuery Configuration value that indicates slow query. (In milliseconds) 0 - disabled. | |
| logToStdout | back to summary |
|---|---|
| private boolean logToStdout | |
| SqlStatementLogger | back to summary |
|---|---|
| public SqlStatementLogger() Constructs a new SqlStatementLogger instance. | |
| SqlStatementLogger | back to summary |
|---|---|
| public SqlStatementLogger(boolean logToStdout, boolean format) Constructs a new SqlStatementLogger instance.
| |
| SqlStatementLogger | back to summary |
|---|---|
| public SqlStatementLogger(boolean logToStdout, boolean format, boolean highlight) Constructs a new SqlStatementLogger instance.
| |
| SqlStatementLogger | back to summary |
|---|---|
| public SqlStatementLogger(boolean logToStdout, boolean format, boolean highlight, long logSlowQuery) Constructs a new SqlStatementLogger instance.
| |
| getLogSlowQuery | back to summary |
|---|---|
| public long getLogSlowQuery() | |
| isFormat | back to summary |
|---|---|
| public boolean isFormat() | |
| isLogToStdout | back to summary |
|---|---|
| public boolean isLogToStdout() Are we currently logging to stdout?
| |
| logSlowQuery | back to summary |
|---|---|
| public void logSlowQuery(Statement statement, long startTimeNanos) Log a slow SQL query
| |
| logSlowQuery | back to summary |
|---|---|
| public void logSlowQuery(String sql, long startTimeNanos) Log a slow SQL query
| |
| logStatement | back to summary |
|---|---|
| public void logStatement(String statement) Log a SQL statement string.
| |
| logStatement | back to summary |
|---|---|
| public void logStatement(String statement, Formatter formatter) Log a SQL statement string using the specified formatter
| |
| setFormat | back to summary |
|---|---|
| public void setFormat(boolean format)
Deprecated Will likely be removed: Should either become immutable or threadsafe.
| |
| setLogToStdout | back to summary |
|---|---|
| public void setLogToStdout(boolean logToStdout)
Deprecated Will likely be removed: Should either become immutable or threadsafe. Enable (true) or disable (false) logging to stdout.
| |