|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.jts.trace.TraceUtil
public class TraceUtil
This class is used to set trace properties and print trace statements. The print method does the printing.
All the methods are unsynchronized. Since setting of properties doesn't happen simultaneously with print
in current usage, this is fine. The tracing should be enabled/disabled by calling
Configuration.enableTrace()/disableTrace()
prior to any operation on TraceUtil.
It uses TraceRecordFormatter for formatting the trace record.
| Constructor Summary | |
|---|---|
TraceUtil()
|
|
| Method Summary | |
|---|---|
static int |
getCurrentTraceLevel()
Gets the current trace level. |
static char |
getFieldDelimiter()
Gets the current field delimiter used in formatting trace record. |
static java.lang.String |
getTraceRecordTag()
Gets the current trace record tag used in formatting of trace record. |
static java.io.PrintWriter |
getTraceWriter()
Gets the current output writer. |
static java.lang.String |
getXAExceptionInfo(XAException exception,
java.util.logging.Logger logger)
Returns details about Oracle XAException if available. |
static void |
init(java.io.PrintWriter traceWriter)
Initialises the trace class with given output writer. |
static void |
print(int traceLevel,
java.lang.Object tid,
java.lang.Object origin,
java.lang.String msg)
This method formats and writes the trace record to current output writer. |
static void |
print(int traceLevel,
java.lang.Object origin,
java.lang.String msg)
This method formats and writes the trace record to current output writer. |
static void |
print(int traceLevel,
java.io.PrintWriter outWriter,
java.lang.Object tid,
java.lang.Object origin,
java.lang.String msg)
This method formats and writes the trace record to output writer. |
static void |
setCurrentTraceLevel(int traceLevel)
Sets the current trace level. |
static void |
setFieldDelimiter(char delimiter)
Sets the current field delimiter. |
static void |
setTraceRecordTag(java.lang.String traceRecordTag)
Sets the trace record tag. |
static void |
setTraceWriter(java.io.PrintWriter traceWriter)
Sets the output writer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TraceUtil()
| Method Detail |
|---|
public static void init(java.io.PrintWriter traceWriter)
traceWriter - an PrintWriter valuepublic static void setTraceWriter(java.io.PrintWriter traceWriter)
traceWriter - an PrintWriter valuepublic static java.io.PrintWriter getTraceWriter()
PrintWriter valuepublic static int getCurrentTraceLevel()
int value
public static void setCurrentTraceLevel(int traceLevel)
throws InvalidTraceLevelException
traceLevel - an int value
InvalidTraceLevelException - if an error occurs
public static void print(int traceLevel,
java.io.PrintWriter outWriter,
java.lang.Object tid,
java.lang.Object origin,
java.lang.String msg)
traceLevel - an int valueoutWriter - an PrintWriter valuetid - an Object valueorigin - an Object valuemsg - a String value
public static void print(int traceLevel,
java.lang.Object origin,
java.lang.String msg)
traceLevel - an int valueorigin - an Object valuemsg - a String value
public static void print(int traceLevel,
java.lang.Object tid,
java.lang.Object origin,
java.lang.String msg)
traceLevel - an int valuetid - an Object valueorigin - an Object valuemsg - a String valuepublic static char getFieldDelimiter()
char valuepublic static void setFieldDelimiter(char delimiter)
delimiter - a char valuepublic static java.lang.String getTraceRecordTag()
String valuepublic static void setTraceRecordTag(java.lang.String traceRecordTag)
traceRecordTag - a String value
public static java.lang.String getXAExceptionInfo(XAException exception,
java.util.logging.Logger logger)
exception - an XAException to get info fromlogger - the Logger to use to report errors extracting the data
String value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||