public class D
extends java.lang.Object
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.
| Modifier and Type | Field and Description |
|---|---|
static int |
ERROR
Priority level ERROR, highest priority level.
|
static int |
INFO
Priority level INFO, lowest priority.
|
static int |
WARNING
Priority level WARNING.
|
| Constructor and Description |
|---|
D() |
| Modifier and Type | Method and Description |
|---|---|
static void |
assrt(boolean conditional,
java.lang.String message)
Test that a condition is true.
|
static java.lang.String |
getLogFileName() |
static long |
getLogFileSize() |
static int |
getLoggingLevel() |
static boolean |
getLoggingToErr() |
static boolean |
getLoggingToFile() |
static boolean |
getLoggingToOut() |
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.String sString,
int iLevel,
int callSiteRewindCount) |
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.
|
static void |
setLoggingLevel(int iLevel) |
static void |
setLoggingToErr(boolean bSet) |
static void |
setLoggingToFile(boolean bSet) |
static void |
setLoggingToOut(boolean bSet) |
public static final int ERROR
ERROR = 1
public static final int WARNING
WARNING = 2
public static final int INFO
LOG_LOW = 3
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(int iLevel)
iLevel - The level to check if it is currently being logged (HIGH, WARNING, INFO)public static boolean isDebugEnabled()
public static void log(java.lang.String sString)
sString - the message to logpublic 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.String sString,
int iLevel,
int callSiteRewindCount)
sString - the message to logiLevel - the priority level (ERROR, WARNING, or INFO)callSiteRewindCount - - the number of additional stack elements to rewind
The default for the standard log() method is 0
For Example: If callSiteRewindCount==1 the method that called the
method that called log() will be show in the prefixpublic static void log(java.lang.Throwable e)
e - the Exception to logpublic static void log(java.lang.Throwable e,
int msgLevel,
int stackTraceLevel)
e - the Exception to logmsgLevel - ERROR, WARNING, INFOstackTraceLevel - ERROR, WARNING, INFOpublic static final void log(org.jdom.Document doc)
doc - xml document to logpublic 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)
doc - xml document to logpublic static final void log(org.w3c.dom.Document doc,
int level)
doc - xml document to loglevel - logging level (ERROR, WARNING, or INFO)public static boolean getLoggingToFile()
public static void setLoggingToFile(boolean bSet)
bSet - true if logging to file is enabled.public static boolean getLoggingToErr()
public static void setLoggingToErr(boolean bSet)
bSet - true if logging to System.err is enabled.public static boolean getLoggingToOut()
public static void setLoggingToOut(boolean bSet)
bSet - true if logging to System.out is enabled.public static int getLoggingLevel()
public static void setLoggingLevel(int iLevel)
iLevel - logging priority level.public static java.lang.String getLogFileName()
public static long getLogFileSize()
API Documentation Copyright © 1998-2004 Novell, Inc. All rights reserved.
NDS is a registered trademark of Novell, Inc. in the United States and other countries.
Generated ${TODAY} ${TSTAMP}.