Package simpleorm.utils
Class SLogSlf4j
java.lang.Object
simpleorm.utils.SLog
simpleorm.utils.SLogSlf4j
- Direct Known Subclasses:
- SormLog
An implementation of SLog to allow Simpleorm to log via Slf4j. Log level is then controlled by slf4j, not by
 SLog.slog.level.
 
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/
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic StringarrayToString(Object[] array) voidconnections(String msg) voidbooleanFor detailed temporary traces during development only.booleanset/get per field.booleanbooleanvoidvoidvoidFor messages that are the output, eg.voidvoidvoidMethods inherited from class simpleorm.utils.SLoggetLevel, getSession, getSessionlessLogger, getSlogClass, getStream, log, newSLog, sessionToString, setLevel, setSession, setSlogClass
- 
Field Details- 
levelpublic int level
 
- 
- 
Constructor Details- 
SLogSlf4jpublic SLogSlf4j()
 
- 
- 
Method Details- 
error
- 
warn
- 
connections- Overrides:
- connectionsin class- SLog
 
- 
enableUpdatespublic boolean enableUpdates()- Overrides:
- enableUpdatesin class- SLog
 
- 
updates
- 
enableQueriespublic boolean enableQueries()- Overrides:
- enableQueriesin class- SLog
 
- 
queries
- 
enableFieldspublic boolean enableFields()set/get per field. enableFields enables the trace line to be surounded by an if test which is important as fields are an inner loop trace and the StringBuffer concatenation can be very expensive!- Overrides:
- enableFieldsin class- SLog
 
- 
fields
- 
enableDebugpublic boolean enableDebug()For detailed temporary traces during development only.- Overrides:
- enableDebugin class- SLog
 
- 
debug
- 
messageFor messages that are the output, eg. of unit test programs. Never disabled.
- 
arrayToString
 
-