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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
arrayToString
(Object[] array) void
connections
(String msg) void
boolean
For detailed temporary traces during development only.boolean
set/get per field.boolean
boolean
void
void
int
getLevel()
static SLog
protected void
void
For messages that are the ouput, eg.static SLog
newSLog()
void
protected String
void
setLevel
(int level) void
setSession
(SSessionI session) static void
setSlogClass
(Class<? extends SLog> slogClass) void
void
-
Constructor Details
-
SLog
public SLog()
-
-
Method Details
-
newSLog
-
error
-
warn
-
connections
-
enableUpdates
public boolean enableUpdates() -
updates
-
enableQueries
public boolean enableQueries() -
queries
-
enableFields
public 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
-
enableDebug
public boolean enableDebug()For detailed temporary traces during development only. -
debug
-
message
For messages that are the ouput, eg. of unit test programs. Never disabled. -
log
-
getStream
-
arrayToString
-
sessionToString
-
getSessionlessLogger
-
getLevel
public int getLevel() -
setLevel
public void setLevel(int level) -
getSlogClass
-
setSlogClass
-
getSession
-
setSession
-