public class CustomLineFormat extends java.lang.Object implements MessageFormattingStrategy
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CATEGORY |
static java.lang.String |
CONNECTION_ID |
static java.lang.String |
CURRENT_TIME |
static java.lang.String |
EFFECTIVE_SQL |
static java.lang.String |
EFFECTIVE_SQL_SINGLELINE |
static java.lang.String |
EXECUTION_TIME |
static java.lang.String |
SQL |
static java.lang.String |
SQL_SINGLE_LINE |
static java.lang.String |
URL |
Constructor and Description |
---|
CustomLineFormat() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
formatMessage(int connectionId,
java.lang.String now,
long elapsed,
java.lang.String category,
java.lang.String prepared,
java.lang.String sql,
java.lang.String url)
Formats a log message for the logging module
|
public static final java.lang.String CONNECTION_ID
public static final java.lang.String CURRENT_TIME
public static final java.lang.String EXECUTION_TIME
public static final java.lang.String CATEGORY
public static final java.lang.String EFFECTIVE_SQL
public static final java.lang.String EFFECTIVE_SQL_SINGLELINE
public static final java.lang.String SQL
public static final java.lang.String SQL_SINGLE_LINE
public static final java.lang.String URL
public java.lang.String formatMessage(int connectionId, java.lang.String now, long elapsed, java.lang.String category, java.lang.String prepared, java.lang.String sql, java.lang.String url)
formatMessage
in interface MessageFormattingStrategy
connectionId
- the id of the connectionnow
- the current ime expressing in millisecondselapsed
- the time in milliseconds that the operation took to completecategory
- the category of the operationprepared
- the SQL statement with all bind variables replaced with actual valuessql
- the sql statement executedurl
- the database url where the sql statement executed