|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.idms.io.AbstractTraceOutput
public abstract class AbstractTraceOutput
This class provides common behavior for classes that implement the
TraceOutput interface used for trace and logging infomation.
Derived classes need only provide a constructor to encapsulate a PrintStream
or PrintWriter and implement the TraceOutput.println(String) method.
Each line in the resulting trace can optionally be identified with
a prefix containing a product identifier, timestamp, and thread id.
| Field Summary | |
|---|---|
protected boolean |
identify
Indicates whether an identifying prefix should be prepended to each line. |
protected java.lang.StringBuffer |
line
Holds print line with an identifying prefix. |
protected static java.lang.String |
product
Product prefix to start each identifier. |
| Constructor Summary | |
|---|---|
AbstractTraceOutput()
|
|
| Method Summary | |
|---|---|
protected java.lang.String |
format(java.lang.String s)
Formats a trace message with an identifying prefix. |
void |
println(java.lang.Object o)
Writes an object to the trace stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface ca.idms.io.TraceOutput |
|---|
println |
| Field Detail |
|---|
protected static java.lang.String product
TraceObject.TRACE_PRODUCTprotected boolean identify
protected java.lang.StringBuffer line
format(String)| Constructor Detail |
|---|
public AbstractTraceOutput()
| Method Detail |
|---|
public void println(java.lang.Object o)
TraceOutput
println in interface TraceOutputo - Object to write.protected java.lang.String format(java.lang.String s)
identify is true this
method will use a StringBuffer to prepend the trace string with
the product identifier, the current timestamp, and the current
thread id. Otherwise it just returns the input string.
s - message to print
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||