Class CICSLogHelper
java.lang.Object
com.ibm.jakarta.connector2.cics.inbound.CICSLogHelper
- All Implemented Interfaces:
CICSLogTraceLevels
,Serializable
Internal Helper class to provide standard logging for all CICS Resource
Adapters. Only available to classes within the same package.
-
Field Summary
FieldsFields inherited from interface com.ibm.jakarta.connector2.cics.inbound.CICSLogTraceLevels
RAS_TRACE_ENTRY_EXIT, RAS_TRACE_ERROR_EXCEPTION, RAS_TRACE_INTERNAL, RAS_TRACE_OFF
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
This returns the trace level ONLY if tracing is active on runtime or tracing is on within the Gateway.int
Get the Trace Level for this Objectvoid
setLogWriter
(PrintWriter newLog) Set the Log to be used by this Objectvoid
setTraceLevel
(int newLevel) Set the Trace Level to be used by this Object.void
traceDebug
(Object caller, String msg) This method should be called to provide a low level debug tracevoid
traceEntry
(Object caller, String method, Object parms) void
traceEntry
(Object caller, String method, String parms) This method should be called to trace entry to a methodvoid
This method should be called to trace an exceptionvoid
This method should be called to trace exit of a methodvoid
This method do a hex dump of a byte array to the logvoid
traceMessage
(String msg) This method should be called to provide a message, for example Resource Adapter Initialised...
-
Field Details
-
CLASS_VERSION
- See Also:
-
-
Constructor Details
-
CICSLogHelper
public CICSLogHelper()Create a Loghelper object. You will need to set the log using the set logwriter method before it will output. However it will output to the client trace if client trace is turned on. It is not possible for the client to write to the log here, the file will be in use and the client cannot handle printWriter objects, only printstream objects. There is no way to map a printWriter object to a printStream object.
-
-
Method Details
-
setLogWriter
Set the Log to be used by this Object- Parameters:
newLog
- a new PrintWriter Object
-
getTraceLevel
public int getTraceLevel()Get the Trace Level for this Object- Returns:
- The current Trace Level
-
getRealTraceLevel
public int getRealTraceLevel()This returns the trace level ONLY if tracing is active on runtime or tracing is on within the Gateway. Otherwise it returns RAS_TRACE_OFFThis is handy to determine whether traceEntry, traceExit, traceDebug or traceEx will actually do anything, traceLine will work if client trace rather than debug is on, in this case, this method won't work.
- Returns:
- The current Trace Level
-
setTraceLevel
public void setTraceLevel(int newLevel) Set the Trace Level to be used by this Object.- Parameters:
newLevel
- The new Trace Level
-
traceEntry
-
traceEntry
This method should be called to trace entry to a method- Parameters:
caller
- this caller reference (usually use 'this')method
- the method nameparms
- Information on parameters passed
-
traceExit
This method should be called to trace exit of a method- Parameters:
caller
- this caller reference (usually use 'this')method
- the method namereturns
- information on what is returned
-
traceMessage
This method should be called to provide a message, for example Resource Adapter Initialised... These should probably be translated. Not sent to client trace.- Parameters:
msg
- The message to Trace
-
traceDebug
This method should be called to provide a low level debug trace- Parameters:
caller
- this caller reference (usually use 'this')msg
- The message to Trace
-
traceEx
This method should be called to trace an exception- Parameters:
caller
- this caller reference (usually use 'this')ex
- The Exception to Trace
-
traceHex
This method do a hex dump of a byte array to the log- Parameters:
caller
- this caller reference (usually use 'this')byteDump
- the byte array to dumpmsg
- a header for the dump
-