|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.novell.nds.dirxml.shimhost.ConsoleTraceImpl
public class ConsoleTraceImpl
An implementation of com.novell.nds.dirxml.driver.TraceInterface
that
can be registered with the com.novell.nds.dirxml.driver.Trace
class.
Trace.registerImpl(java.lang.Class, double)
Field Summary | |
---|---|
protected static String |
DEFAULT_TIME_FORMAT
Default timestamp formatting string to use: "[MM/dd/yy HH:mm:ss.SS]: " |
protected static LocalizedMessageSource |
messageSource
Source of localized message strings |
protected static PrintStream |
printStream
PrintStream to which output is written |
protected static String |
TAB
String used for indenting XML documents |
protected static SimpleDateFormat |
timeFormat
Time formatter for timestamps. |
protected static String |
timeFormatString
Time format string for timestamps. |
protected static String |
TRACE_TIMEFORMAT
|
protected static int |
traceLevel
|
Constructor Summary | |
---|---|
ConsoleTraceImpl()
Construct an instance. |
Method Summary | |
---|---|
int |
getLevel()
Return the current trace level. |
static void |
setLevel(int newLevel)
Set the trace level for this class. |
protected static String |
timeStampMessage(String message)
Prepend a timestamp to a String and return the result. |
void |
trace(int color,
int level,
String message)
Output a message string if the passed level is greater than or equal to the current trace level. |
void |
trace(int level,
String message)
Output a message string if the passed level is greater than or equal to the current trace level. |
void |
trace(int level,
XmlDocument document)
Serialize and output XML document if passed level is greater than or equal to the current trace level. |
protected void |
traceAlways(Document document)
Output an XML Document regardless of level |
protected void |
traceAlways(String message)
Output a message regardless of level. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static int traceLevel
protected static final String TAB
protected static LocalizedMessageSource messageSource
protected static PrintStream printStream
PrintStream
to which output is written
protected static String timeFormatString
protected static SimpleDateFormat timeFormat
protected static final String DEFAULT_TIME_FORMAT
protected static final String TRACE_TIMEFORMAT
Constructor Detail |
---|
public ConsoleTraceImpl()
com.novell.nds.dirxml.driver.Trace
class.
Trace.registerImpl(java.lang.Class, double)
Method Detail |
---|
public int getLevel()
public static void setLevel(int newLevel)
newLevel
- new trace levelpublic void trace(int level, String message)
trace
in interface TraceInterface
level
- trace level for message.message
- String
to output.public void trace(int color, int level, String message)
trace
in interface TraceInterface
color
- Ignored herelevel
- trace level for message.message
- String
to output.public void trace(int level, XmlDocument document)
trace
in interface TraceInterface
level
- trace level for document.document
- The XML document to outputprotected void traceAlways(String message)
message
- String
to outputprotected void traceAlways(Document document)
Document
regardless of level
document
- XML Document
protected static String timeStampMessage(String message)
message
- String to which to prepend timestamp.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |