com.ibm.commerce.edp.utils

Class EDPTrace

  • java.lang.Object
    • com.ibm.commerce.edp.utils.EDPTrace


  • public class EDPTrace
    extends java.lang.Object
    Payment Rules Logger class. This class wrapps system logging facility.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM copyright notice field.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static void debug(java.lang.String loggerName, java.lang.String className, java.lang.String methodName, java.lang.String text)
      This method writes a trace record containing the specified text if debug tracing for the specified logger is enabled.
      static void debug(java.lang.String loggerName, java.lang.String className, java.lang.String methodName, java.lang.String text, java.lang.Object parm)
      This method writes a trace record containing the specified text and parameters if debug tracing for the specified logger is enabled.
      static void debug(java.lang.String loggerName, java.lang.String className, java.lang.String methodName, java.lang.String text, java.lang.Object[] parms)
      This method writes a trace record containing the specified text and parameters if debug tracing for the specified logger is enabled.
      static void entry(java.lang.String loggerName, java.lang.String className, java.lang.String methodName)
      This method writes a trace method entry record if entryExit tracing for the specified logger is enabled.
      static void entry(java.lang.String loggerName, java.lang.String className, java.lang.String methodName, java.lang.Object parm)
      This method writes a trace method entry record if entryExit tracing for the specified logger is enabled.
      static void entry(java.lang.String loggerName, java.lang.String className, java.lang.String methodName, java.lang.Object[] parms)
      This method writes a trace method entry record if entryExit tracing for the specified logger is enabled.
      static void event(java.lang.String loggerName, java.lang.String className, java.lang.String methodName, java.lang.String text)
      This method writes a trace record containing the specified text if any tracing is enabled for the specified logger.
      static void event(java.lang.String loggerName, java.lang.String className, java.lang.String methodName, java.lang.String text, java.lang.Object[] parms)
      This method writes a trace record containing the specified text and parameters if any tracing is enabled for the specified logger.
      static void exception(java.lang.String loggerName, java.lang.String className, java.lang.String methodName, java.lang.Throwable t)
      This method writes a trace record containing the specified exception if any tracing is enabled for the specified logger.
      static void exit(java.lang.String loggerName, java.lang.String className, java.lang.String methodName)
      This method writes a trace method exit record if entryExit tracing for the specified logger is enabled.
      static void exit(java.lang.String loggerName, java.lang.String className, java.lang.String methodName, java.lang.Object retValue)
      This method writes a trace method exit record containing the specified return value if entryExit tracing for the specified logger is enabled.
      static com.ibm.ras.RASTraceLogger getTraceLogger(int loggerIndex)
      This method returns the RAS trace logger object associated with the specified index value.
      static com.ibm.ras.RASTraceLogger getTraceLogger(java.lang.String loggerName)
      This method returns the RAS trace logger object for the specified component
      static com.ibm.ras.RASTraceLogger getTraceLogger(java.lang.String loggerName, int loggerIndex)
      This method returns the RAS trace logger object for the specified component name.
      static boolean isTracing(int loggerIndex)
      This method indicates whether the trace logger is currently enabled to trace records.
      static boolean isTracing(java.lang.String loggerName)
      This method indicates whether the trace logger is currently enabled to trace records.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
    • Method Detail

      • getTraceLogger

        public static final com.ibm.ras.RASTraceLogger getTraceLogger(java.lang.String loggerName)
        This method returns the RAS trace logger object for the specified component
        Parameters:
        loggerName - The component that identifies the trace logger
        Returns:
        The RAS trace logger object for the specified component
      • getTraceLogger

        public static final com.ibm.ras.RASTraceLogger getTraceLogger(java.lang.String loggerName,
                                                                      int loggerIndex)
        This method returns the RAS trace logger object for the specified component name. Also associates the specified index value with the specified name.
        Parameters:
        loggerName - The component that identifies the trace logger
        loggerIndex - The index value to be associated with the specified name.
        Returns:
        The RAS trace logger object for the specified component
      • getTraceLogger

        public static final com.ibm.ras.RASTraceLogger getTraceLogger(int loggerIndex)
        This method returns the RAS trace logger object associated with the specified index value.
        Parameters:
        loggerIndex - The component that has previously been associated with a trace logger.
        Returns:
        The RAS trace logger object for the specified component
      • isTracing

        public static final boolean isTracing(java.lang.String loggerName)
        This method indicates whether the trace logger is currently enabled to trace records. All calls to one of the trace methods in this class should be conditioned using this method as follows:
           if (isTracing(LOGGER_NAME)) WASTrace.debug(LOGGER_NAME,...);
         
        This will improve the performance of the system since the arguments of the debug(...) method will not be evaluated when tracing is disabled.
        Parameters:
        loggerName - The unique name for the trace logger
        Returns:
        true if tracing for the specified logger is enabled; false otherwise
      • isTracing

        public static final boolean isTracing(int loggerIndex)
        This method indicates whether the trace logger is currently enabled to trace records. All calls to one of the trace methods in this class should be conditioned using this method as follows:
           if (isTracing(LOGGER_INDEX)) WASTrace.debug(LOGGER_NAME,...);
         
        This will improve the performance of the system since the arguments of the debug(...) method will not be evaluated when tracing is disabled.
        Parameters:
        loggerIndex - The component that has previously been associated with a trace logger.
        Returns:
        true if tracing for the specified logger is enabled; false otherwise
      • debug

        public static final void debug(java.lang.String loggerName,
                                       java.lang.String className,
                                       java.lang.String methodName,
                                       java.lang.String text)
        This method writes a trace record containing the specified text if debug tracing for the specified logger is enabled.
        Parameters:
        loggerName - The unique name for the trace logger
        className - The name of the calling class
        methodName - The name of the calling method
        text - The text to be written to the trace record
      • debug

        public static final void debug(java.lang.String loggerName,
                                       java.lang.String className,
                                       java.lang.String methodName,
                                       java.lang.String text,
                                       java.lang.Object parm)
        This method writes a trace record containing the specified text and parameters if debug tracing for the specified logger is enabled.
        Parameters:
        loggerName - The unique name for the trace logger
        className - The name of the calling class
        methodName - The name of the calling method
        text - The text to be written to the trace record
        parm - The data to be written to the trace record.
      • debug

        public static final void debug(java.lang.String loggerName,
                                       java.lang.String className,
                                       java.lang.String methodName,
                                       java.lang.String text,
                                       java.lang.Object[] parms)
        This method writes a trace record containing the specified text and parameters if debug tracing for the specified logger is enabled.
        Parameters:
        loggerName - The unique name for the trace logger
        className - The name of the calling class
        methodName - The name of the calling method
        text - The to be written to the trace record
        parms - The data to be written to the trace record. Each object in the array should respond appropriately to the toString() method.
      • entry

        public static final void entry(java.lang.String loggerName,
                                       java.lang.String className,
                                       java.lang.String methodName)
        This method writes a trace method entry record if entryExit tracing for the specified logger is enabled.
        Parameters:
        loggerName - The unique name for the trace logger
        className - The name of the calling class
        methodName - The name of the calling method
      • entry

        public static final void entry(java.lang.String loggerName,
                                       java.lang.String className,
                                       java.lang.String methodName,
                                       java.lang.Object parm)
        This method writes a trace method entry record if entryExit tracing for the specified logger is enabled.
        Parameters:
        loggerName - The unique name for the trace logger
        className - The name of the calling class
        methodName - The name of the calling method
        parm - The data to be written to the trace record
      • entry

        public static final void entry(java.lang.String loggerName,
                                       java.lang.String className,
                                       java.lang.String methodName,
                                       java.lang.Object[] parms)
        This method writes a trace method entry record if entryExit tracing for the specified logger is enabled.
        Parameters:
        loggerName - The unique name for the trace logger
        className - The name of the calling class
        methodName - The name of the calling method
        parms - The data to be written to the trace record
      • event

        public static final void event(java.lang.String loggerName,
                                       java.lang.String className,
                                       java.lang.String methodName,
                                       java.lang.String text)
        This method writes a trace record containing the specified text if any tracing is enabled for the specified logger.
        Parameters:
        loggerName - The unique name for the trace logger
        className - The name of the calling class
        methodName - The name of the calling method
        text - The text to be written to the trace record
      • event

        public static final void event(java.lang.String loggerName,
                                       java.lang.String className,
                                       java.lang.String methodName,
                                       java.lang.String text,
                                       java.lang.Object[] parms)
        This method writes a trace record containing the specified text and parameters if any tracing is enabled for the specified logger.
        Parameters:
        loggerName - The unique name for the trace logger
        className - The name of the calling class
        methodName - The name of the calling method
        text - The text to be written to the trace record
        parms - The data to be written to the trace record. Each object in the array should respond appropriately to the toString() method.
      • exception

        public static final void exception(java.lang.String loggerName,
                                           java.lang.String className,
                                           java.lang.String methodName,
                                           java.lang.Throwable t)
        This method writes a trace record containing the specified exception if any tracing is enabled for the specified logger.
        Parameters:
        loggerName - The unique name for the trace logger
        className - The name of the calling class
        methodName - The name of the calling method
        t - The Throwable to report in the trace log
      • exit

        public static final void exit(java.lang.String loggerName,
                                      java.lang.String className,
                                      java.lang.String methodName)
        This method writes a trace method exit record if entryExit tracing for the specified logger is enabled.
        Parameters:
        loggerName - The unique name for the trace logger
        className - The name of the calling class
        methodName - The name of the calling method
      • exit

        public static final void exit(java.lang.String loggerName,
                                      java.lang.String className,
                                      java.lang.String methodName,
                                      java.lang.Object retValue)
        This method writes a trace method exit record containing the specified return value if entryExit tracing for the specified logger is enabled.
        Parameters:
        loggerName - The unique name for the trace logger
        className - The name of the calling class
        methodName - The name of the calling method
        retValue - The value to be returned by the calling method