|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.as400.data.PcmlMessageLog
public class PcmlMessageLog extends Object
Provides control over logging and tracing activity within this
package. PcmlMessageLog
can be used to redirect error logging to a
specific log file or OutputStream
. It is also used
to suppress the low level information/error messages normally written
to the console.
Modifier and Type | Method and Description |
---|---|
static String |
getLogFileName()
Deprecated. Replaced by com.ibm.as400.access.Trace.getFileName(). |
static OutputStream |
getLogStream()
Deprecated. Replaced by com.ibm.as400.access.Trace.getPrintWriter(). |
static boolean |
isTraceEnabled()
Deprecated. Replaced by com.ibm.as400.access.Trace.isTracePCMLOn(). |
static void |
logError(Object errorData)
Deprecated. Replaced by com.ibm.as400.access.Trace.log(int category, String message). |
static void |
logError(Object errorData,
Throwable t)
Deprecated. Replaced by com.ibm.as400.access.Trace.log(int category, String message, Throwable e). |
static void |
printStackTrace(Throwable t)
Deprecated. Use java.lang.Throwable.printStackTrace(PrintWriter w). |
static void |
setLogFileName(String fileName)
Deprecated. Replaced by com.ibm.as400.access.Trace.setFileName(String fileName). |
static void |
setLogStream(OutputStream stream)
Deprecated. Replaced by com.ibm.as400.access.Trace.setPrintWriter(PrintWriter obj). |
static void |
setTraceEnabled(boolean enabled)
Deprecated. Replaced by com.ibm.as400.access.Trace.setTracePCMLOn(boolean tracePCML). |
static void |
traceErr(Object data)
Deprecated. This method does nothing. Replaced by com.ibm.as400.access.Trace.log(int category, String message). |
static void |
traceOut(Object data)
Deprecated. This method does nothing. Replaced by com.ibm.as400.access.Trace.log(int category, String message). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void setLogFileName(String fileName) throws IOException
fileName
- the log file name. If null, output goes to System.err
.IOException
- if the file cannot be accessedgetLogFileName()
public static String getLogFileName()
System.err
, or if
an OutputStream
was specified on a call to setLogStream
.
setLogFileName(java.lang.String)
,
setLogStream(java.io.OutputStream)
public static void setLogStream(OutputStream stream)
OutputStream
used by the
application itself for logging errors.
stream
- the OutputStream
to which error data should be sent.
If null, output goes to System.err
.getLogStream()
public static OutputStream getLogStream()
OutputStream
.
OutputStream
to which error data is being sentsetLogStream(java.io.OutputStream)
public static void logError(Object errorData)
System.err
.
errorData
- the data to be loggedpublic static void logError(Object errorData, Throwable t)
System.err
.
errorData
- the data to be loggedt
- the Throwable
which will be used to obtain the stack tracepublic static void printStackTrace(Throwable t)
t
- the Throwable
which will be used to obtain the stack tracepublic static void setTraceEnabled(boolean enabled)
true
.
enabled
- If true, allows the messages; otherwise, suppresses the messages.isTraceEnabled()
public static boolean isTraceEnabled()
true
.
setTraceEnabled(boolean)
public static void traceOut(Object data)
System.out
if low level tracing is enabled.
data
- the data to be loggedtraceErr(java.lang.Object)
public static void traceErr(Object data)
System.err
if low level tracing is enabled.
data
- the data to be loggedtraceOut(java.lang.Object)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |