public class SLogSlf4j extends SLog
Mapping between SLog and slf4j log levels is:
SLog Slf4j - Marker ---------------- -------------------- debug (30) debug warn warn message warn error error connections (10) info updates (20) debug SORM_UPDATE queries (30) debug SORM_QUERY fields (40) trace SORM_FIELD
To use this logging API, you must: 1) SLog.setSlogClass(SLogSlf4j.class); somewhere early in you app (in you servlet init sequence for example) 2) make sure you have a slf4j implementation in your classpath (logback, simplelogger, etc.)
Configure slf4j, for examples, @see http://www.slf4j.org/
Modifier and Type | Field and Description |
---|---|
int |
level |
Constructor and Description |
---|
SLogSlf4j() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
arrayToString(java.lang.Object[] array) |
void |
connections(java.lang.String msg) |
void |
debug(java.lang.String msg) |
boolean |
enableDebug()
For detailed temporary traces during development only.
|
boolean |
enableFields()
set/get per field.
|
boolean |
enableQueries() |
boolean |
enableUpdates() |
void |
error(java.lang.String msg) |
void |
fields(java.lang.String msg) |
void |
message(java.lang.String msg)
For messages that are the output, eg.
|
void |
queries(java.lang.String msg) |
void |
updates(java.lang.String msg) |
void |
warn(java.lang.String msg) |
getLevel, getSession, getSessionlessLogger, getSlogClass, getStream, log, newSLog, sessionToString, setLevel, setSession, setSlogClass
public void connections(java.lang.String msg)
connections
in class SLog
public boolean enableUpdates()
enableUpdates
in class SLog
public boolean enableQueries()
enableQueries
in class SLog
public boolean enableFields()
enableFields
in class SLog
public boolean enableDebug()
enableDebug
in class SLog
public void message(java.lang.String msg)
public static java.lang.String arrayToString(java.lang.Object[] array)