Package simpleorm.utils
Class SLog
java.lang.Object
simpleorm.utils.SLog
- Direct Known Subclasses:
- SLogSlf4j
Very simple logging system.
 
 Logging calls are all made SLog.log.method so overriding this
 class with a subclass of SLog provides full control of the logging if really
 necessary.
Most logging happens in the context of a session, which should be used to identify and separate multiple threads in a log file. However, some logging has no session or dataset, so we cannot simply associate the session with the slog object, and the
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic StringarrayToString(Object[] array) voidconnections(String msg) voidbooleanFor detailed temporary traces during development only.booleanset/get per field.booleanbooleanvoidvoidintgetLevel()static SLogprotected voidvoidFor messages that are the ouput, eg.static SLognewSLog()voidprotected StringvoidsetLevel(int level) voidsetSession(SSessionI session) static voidsetSlogClass(Class<? extends SLog> slogClass) voidvoid
- 
Constructor Details- 
SLogpublic SLog()
 
- 
- 
Method Details- 
newSLog
- 
error
- 
warn
- 
connections
- 
enableUpdatespublic boolean enableUpdates()
- 
updates
- 
enableQueriespublic boolean enableQueries()
- 
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!
- 
fields
- 
enableDebugpublic boolean enableDebug()For detailed temporary traces during development only.
- 
debug
- 
messageFor messages that are the ouput, eg. of unit test programs. Never disabled.
- 
log
- 
getStream
- 
arrayToString
- 
sessionToString
- 
getSessionlessLogger
- 
getLevelpublic int getLevel()
- 
setLevelpublic void setLevel(int level) 
- 
getSlogClass
- 
setSlogClass
- 
getSession
- 
setSession
 
-