public class Slf4JLogger extends FormattedLogger
strategy
Constructor and Description |
---|
Slf4JLogger() |
Modifier and Type | Method and Description |
---|---|
boolean |
isCategoryEnabled(Category category) |
void |
logException(java.lang.Exception e)
Logs the stacktrace of the exception.
|
void |
logSQL(int connectionId,
java.lang.String now,
long elapsed,
Category category,
java.lang.String prepared,
java.lang.String sql)
Logs the
SQL . |
void |
logText(java.lang.String text)
Logs the text.
|
setStrategy
public void logException(java.lang.Exception e)
P6Logger
e
- exception holding the stacktrace to be logged.public void logText(java.lang.String text)
P6Logger
text
- to be loggedpublic void logSQL(int connectionId, java.lang.String now, long elapsed, Category category, java.lang.String prepared, java.lang.String sql)
P6Logger
SQL
.logSQL
in interface P6Logger
logSQL
in class FormattedLogger
connectionId
- connection identifier.now
- current time.category
- the category to be used for logging.prepared
- the prepared statement to be logged.sql
- the SQL
to be logged.public boolean isCategoryEnabled(Category category)
category
- the category to be evaluated.true
if category is enabled. Otherwise returns
false