|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.novell.emframe.dev.D
Provides a simple mechanism for plugins to log debug messages. The writing of the log occurs asynchronously: the log methods simply queue the event and return immediately while the actual writing is done later by a separate thread. Three levels of logging are supported: ERROR, WARNING and INFO. Only messages with a priority greater than or equal to the current level are logged, those with a lower priority are discarded. Adminstrators can configure the current logging level.
The logging is controlled through the webapps/nps/WEB-INF/Config.xml as follows:
Output to a file is written as XML, with one <log> element enclosing multiple <entry src=""> elements, where the src attribute specifies the source tag. The final </log> needs to be added manually before the file can be displayed with an XML\XSL capable tool. Of course, the file can always be viewed with any text editor.
| Field Summary | |
static int |
ERROR
Priority level ERROR, highest priority level. |
static int |
INFO
Priority level INFO, lowest priority. |
static int |
WARNING
Priority level WARNING. |
| Constructor Summary | |
D()
|
|
| Method Summary | |
static void |
assrt(boolean conditional,
java.lang.String message)
Test that a condition is true. |
static boolean |
isDebugEnabled()
Checks if debug is enabled for the INFO (low) level. |
static boolean |
isDebugEnabled(int iLevel)
Checks if debug is enabled for the level passed in. |
static void |
log(org.jdom.Document doc)
Logs a JDOM XML document with INFO(low) level. |
static void |
log(org.w3c.dom.Document doc)
Logs a W3C XML document with INFO (low) level. |
static void |
log(org.jdom.Document doc,
int level)
Logs a JDOM XML document with the specified level. |
static void |
log(org.w3c.dom.Document doc,
int level)
Logs a W3C XML document with the specified level. |
static void |
log(java.lang.String sString)
Logs a message with priority INFO (low) and tag "unknown". |
static void |
log(java.lang.String sString,
int iLevel)
Logs a message if the current level is equal to or lower than a specified level. |
static void |
log(java.lang.Throwable e)
Logs an Exception with priority INFO (low). |
static void |
log(java.lang.Throwable e,
int msgLevel,
int stackTraceLevel)
Logs an Exception with priority specified. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int ERROR
ERROR = 1
public static final int INFO
LOG_LOW = 3
public static final int WARNING
WARNING = 2
| Constructor Detail |
public D()
| Method Detail |
public static final void assrt(boolean conditional,
java.lang.String message)
conditional - boolean statement that if evaluated to be false the message will be logged, otherwise nothing
will be loggedmessage - message to be displayed if the condition is falsepublic static boolean isDebugEnabled()
public static boolean isDebugEnabled(int iLevel)
iLevel - The level to check if it is currently being logged (HIGH, WARNING, INFO)
public static final void log(org.jdom.Document doc)
doc - xml document to logpublic static final void log(org.w3c.dom.Document doc)
doc - xml document to log
public static final void log(org.jdom.Document doc,
int level)
doc - xml document to loglevel - logging level (ERROR, WARNING, or INFO)
public static final void log(org.w3c.dom.Document doc,
int level)
doc - xml document to loglevel - logging level (ERROR, WARNING, or INFO)public static void log(java.lang.String sString)
sString - the message to log
public static void log(java.lang.String sString,
int iLevel)
sString - the message to logiLevel - the priority level (ERROR, WARNING, or INFO)public static void log(java.lang.Throwable e)
e - the Exception to log
public static void log(java.lang.Throwable e,
int msgLevel,
int stackTraceLevel)
e - the Exception to logmsgLevel - ERROR, WARNING, INFOstackTraceLevel - ERROR, WARNING, INFO
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||