public class PcmlMessageLog
extends java.lang.Object
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 java.lang.String |
getLogFileName()
Deprecated.
Replaced by com.ibm.as400.access.Trace.getFileName().
|
static java.io.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(java.lang.Object errorData)
Deprecated.
Replaced by com.ibm.as400.access.Trace.log(int category, String message).
|
static void |
logError(java.lang.Object errorData,
java.lang.Throwable t)
Deprecated.
Replaced by com.ibm.as400.access.Trace.log(int category, String message, Throwable e).
|
static void |
printStackTrace(java.lang.Throwable t)
Deprecated.
Use java.lang.Throwable.printStackTrace(PrintWriter w).
|
static void |
setLogFileName(java.lang.String fileName)
Deprecated.
Replaced by com.ibm.as400.access.Trace.setFileName(String fileName).
|
static void |
setLogStream(java.io.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(java.lang.Object data)
Deprecated.
This method does nothing. Replaced by com.ibm.as400.access.Trace.log(int category, String message).
|
static void |
traceOut(java.lang.Object data)
Deprecated.
This method does nothing. Replaced by com.ibm.as400.access.Trace.log(int category, String message).
|
public static void setLogFileName(java.lang.String fileName) throws java.io.IOException
fileName
- the log file name. If null, output goes to System.err
.java.io.IOException
- if the file cannot be accessedgetLogFileName()
public static java.lang.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(java.io.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 java.io.OutputStream getLogStream()
OutputStream
.OutputStream
to which error data is being sentsetLogStream(java.io.OutputStream)
public static void logError(java.lang.Object errorData)
System.err
.errorData
- the data to be loggedpublic static void logError(java.lang.Object errorData, java.lang.Throwable t)
System.err
.errorData
- the data to be loggedt
- the Throwable
which will be used to obtain the stack tracepublic static void printStackTrace(java.lang.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(java.lang.Object data)
System.out
if low level tracing is enabled.data
- the data to be loggedtraceErr(java.lang.Object)
public static void traceErr(java.lang.Object data)
System.err
if low level tracing is enabled.data
- the data to be loggedtraceOut(java.lang.Object)