|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.novell.nds.dirxml.shimhost.FileTraceImpl
public class FileTraceImpl
An implementation of com.novell.nds.dirxml.driver.TraceInterface
that
can be registered with the com.novell.nds.dirxml.driver.Trace
class.
setFile()
method.
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
|
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 | |
---|---|
FileTraceImpl()
Construct an instance. |
Method Summary | |
---|---|
int |
getLevel()
Return the current trace level. |
static void |
setFile(File file)
Set the file to use for this class. |
static void |
setFile(String filename)
Set the file name to use for this class. |
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 PrintStream printStream
protected static int traceLevel
protected static final String TAB
protected static LocalizedMessageSource messageSource
protected static String timeFormatString
protected static SimpleDateFormat timeFormat
protected static final String DEFAULT_TIME_FORMAT
protected static final String TRACE_TIMEFORMAT
Constructor Detail |
---|
public FileTraceImpl()
com.novell.nds.dirxml.driver.Trace
class.
Trace.registerImpl(java.lang.Class, double)
Method Detail |
---|
public static void setFile(File file) throws IOException
com.novell.nds.dirxml.driver.Trace
class creates an instance
of this class.
file
- File
to receive trace information
IOException
- if an error occurs opening the filepublic static void setFile(String filename) throws IOException
com.novell.nds.dirxml.driver.Trace
class creates an instance
of this class.
filename
- name of file to receive trace information
IOException
- if an error occurs opening the filepublic 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 |