public class Trace
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
DEBUG |
static int |
DEFAULT |
static int |
DETAIL |
static int |
DIAGNOSTIC |
static int |
ERROR |
static int |
INFO |
static int |
NONE |
static int |
SUMMARY |
Constructor and Description |
---|
Trace() |
Modifier and Type | Method and Description |
---|---|
static void |
custom(int iTrace,
java.lang.String sMsg)
A shorthand method for producing custom trace output
|
static void |
debug(java.lang.Exception pErr)
A shorthand method for dumping an exception to debug trace output
|
static void |
debug(java.lang.String sMsg)
A shorthand method for producing debug trace output
|
static void |
detail(java.lang.Exception pErr)
A shorthand method for dumping an exception to detailed trace output
|
static void |
detail(java.lang.String sMsg)
A shorthand method for producing detailed trace output
|
static void |
diagnostic(java.lang.Exception pErr)
A shorthand method for dumping an exception to diagnostic trace output
|
static void |
diagnostic(int iTrace,
java.lang.Exception pErr)
A shorthand method for dumping an exception to custom trace output
|
static void |
diagnostic(java.lang.String sMsg)
A shorthand method for producing diagnostic trace output
|
static void |
error(java.lang.Exception pErr)
A shorthand method for dumping an exception to error trace output
|
static void |
error(java.lang.String sMsg)
A shorthand method for producing error trace output
|
static int |
getLevel()
Indicate the current trace level
|
static java.lang.String |
getVersion()
Provide version information for the library
|
static void |
info(java.lang.Exception pErr)
A shorthand method for dumping an exception to info trace output
|
static void |
info(java.lang.String sMsg)
A shorthand method for producing info trace output
|
static int |
parseLevel(java.lang.String sTrace)
Perform parsing logic on a string to determine the best match to
a valid log level
|
static int |
setLevel(int iNewLevel)
Change the trace output level
|
static void |
setOutputFile(java.lang.String sNewFile)
Change the output location for trace information
|
static void |
setRetainFileOpen(boolean bStatus)
Change the retention of open log file stream
|
static void |
summary(java.lang.Exception pErr)
A shorthand method for dumping an exception to summary trace output
|
static void |
summary(java.lang.String sMsg)
A shorthand method for producing summary trace output
|
static long |
timerMark(java.lang.String sTag)
Get the current elapsed time from a timer
named by sTag, and drop (release) the timer
|
static long |
timerMark(java.lang.String sTag,
boolean bReset)
Get the current elapsed time from a timer
named by sTag
|
static long |
timerSet(java.lang.String sTag)
Start a timer named by sTag at zero
|
public static final int NONE
public static final int ERROR
public static final int INFO
public static final int SUMMARY
public static final int DEBUG
public static final int DETAIL
public static final int DIAGNOSTIC
public static final int DEFAULT
public static java.lang.String getVersion()
public static int parseLevel(java.lang.String sTrace)
sTrace
- The string to parsepublic static void setRetainFileOpen(boolean bStatus)
bStatus
- Whether to retain open log file stream or notpublic static void setOutputFile(java.lang.String sNewFile)
sNewFile
- The name of the file trace output is to be written topublic static int setLevel(int iNewLevel)
iNewLevel
- The new trace levelpublic static int getLevel()
public static long timerSet(java.lang.String sTag)
sTag
- The name of the timerpublic static long timerMark(java.lang.String sTag)
sTag
- The name of the timerpublic static long timerMark(java.lang.String sTag, boolean bReset)
sTag
- The name of the timerbReset
- Whether the timer should be started over or notpublic static void error(java.lang.String sMsg)
sMsg
- The message to be writtenpublic static void error(java.lang.Exception pErr)
pErr
- The exception to be dumped.public static void info(java.lang.String sMsg)
sMsg
- The message to be writtenpublic static void info(java.lang.Exception pErr)
pErr
- The exception to be dumped.public static void summary(java.lang.String sMsg)
sMsg
- The message to be writtenpublic static void summary(java.lang.Exception pErr)
pErr
- The exception to be dumped.public static void debug(java.lang.String sMsg)
sMsg
- The message to be writtenpublic static void debug(java.lang.Exception pErr)
pErr
- The exception to be dumped.public static void detail(java.lang.String sMsg)
sMsg
- The message to be writtenpublic static void detail(java.lang.Exception pErr)
pErr
- The exception to be dumped.public static void diagnostic(java.lang.String sMsg)
sMsg
- The message to be written.public static void diagnostic(java.lang.Exception pErr)
pErr
- The exception to be dumped.public static void custom(int iTrace, java.lang.String sMsg)
iTrace
- The custom trace level this output requiressMsg
- The message to be writtenpublic static void diagnostic(int iTrace, java.lang.Exception pErr)
iTrace
- The custom trace level this output requirespErr
- The exception to be dumped