|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcern.cmw.rda.MessageLogger
public class MessageLogger
Provides a mechanism for logging error and trace messages.
This class defines a general interface for the message logging and provides its default implementation that writes errors to System.err and traces to System.out. Derived classes can override this default behaviour and use various system specific logging facilities.
The actual class of the logger singleton is determined by the
cmw.rda.loggerClassName
property; if it is not defined then
the default implementation is used.
If the property has an invalid value (does not identify a loadable
subclass of MessageLogger) then CmwInternalError will be thrown by the
method.
getLogger
CmwInternalError
Field Summary | |
---|---|
static boolean |
DEBUG
|
Constructor Summary | |
---|---|
protected |
MessageLogger()
Constructs a default MessageLogger. |
Method Summary | |
---|---|
void |
error(String message)
Records the specified error message. |
static MessageLogger |
getLogger()
Returns the message logger singleton. |
static int |
getTraceLevel()
Returns the trace level. |
static void |
setTraceLevel(int level)
Sets the trace level to the specified value. |
void |
trace(int level,
String message)
Records the specified trace message if the current trace level is equal to or greater then the message level. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static boolean DEBUG
Constructor Detail |
---|
protected MessageLogger()
Method Detail |
---|
public static MessageLogger getLogger()
public static int getTraceLevel()
public static void setTraceLevel(int level)
public void error(String message)
public void trace(int level, String message)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |