com.ibm.commerce.edp.utils

Class EDPLog

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


  • public class EDPLog
    extends java.lang.Object
    This is the 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 createLogger(java.lang.String loggerName, java.lang.String componentName, java.lang.String resourceBundleName)
      This method creates a logger with the specified logger name.
      static void error(java.lang.String loggerName, java.lang.String messageKey, java.lang.String className, java.lang.String methodName)
      This method logs an error message that requires no parameters to the WebSphere message log.
      static void error(java.lang.String loggerName, java.lang.String messageKey, java.lang.String className, java.lang.String methodName, java.lang.Object parm)
      This method logs an error message that requires a single parameter to the WebSphere message log.
      static void error(java.lang.String loggerName, java.lang.String messageKey, java.lang.String className, java.lang.String methodName, java.lang.Object[] parms)
      This method logs an error message that requires an arbitrary number of parameters to the WebSphere message log.
      static void error(java.lang.String loggerName, java.lang.String messageKey, java.lang.String className, java.lang.String methodName, java.lang.String parm)
      This method logs an error message that requires a single parameter to the WebSphere message log.
      static void errorText(java.lang.String loggerName, java.lang.String className, java.lang.String methodName, java.lang.String text)
      This method logs an error message that requires an arbitrary number of parameters to the WebSphere message log.
      static com.ibm.ras.RASMessageLogger getMessageLogger(java.lang.String loggerName)
      This method returns the message logger object with the specified logger name.
      static void info(java.lang.String loggerName, java.lang.String messageKey, java.lang.String className, java.lang.String methodName)
      This method logs an informational message that requires no parameters to the WebSphere message log.
      static void info(java.lang.String loggerName, java.lang.String messageKey, java.lang.String className, java.lang.String methodName, java.lang.Object parm)
      This method logs an informational message to the WebSphere message log.
      static void info(java.lang.String loggerName, java.lang.String messageKey, java.lang.String className, java.lang.String methodName, java.lang.Object[] parms)
      This method logs an informational message to the WebSphere message log.
      static void info(java.lang.String loggerName, java.lang.String messageKey, java.lang.String className, java.lang.String methodName, java.lang.String parm)
      This method logs an informational message that requires a single parameter to the WebSphere message log.
      static void infoText(java.lang.String loggerName, java.lang.String className, java.lang.String methodName, java.lang.String text)
      This method logs an informational message to the WebSphere message log.
      static boolean isEarlyTranslation()
      This method returns if translation should happen inside of Payment Rules.
      static void setEarlyTranslation(boolean value)
      This method sets if translation should happen inside of Payment Rules.
      static void warn(java.lang.String loggerName, java.lang.String messageKey, java.lang.String className, java.lang.String methodName)
      This method logs a warning message that requires no parameters to the WebSphere message log.
      static void warn(java.lang.String loggerName, java.lang.String messageKey, java.lang.String className, java.lang.String methodName, java.lang.Object[] parms)
      This method logs a warning message to the WebSphere message log.
      static void warn(java.lang.String loggerName, java.lang.String messageKey, java.lang.String className, java.lang.String methodName, java.lang.String parm)
      This method logs a warning message that requires a single parameter to the WebSphere message log.
      static void warnText(java.lang.String loggerName, java.lang.String className, java.lang.String methodName, java.lang.String text)
      This method logs a warning message to the WebSphere message log.
      • 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

      • setEarlyTranslation

        public static final void setEarlyTranslation(boolean value)
        This method sets if translation should happen inside of Payment Rules.
        Parameters:
        value - If translation should happen inside of Payment Rules
      • isEarlyTranslation

        public static final boolean isEarlyTranslation()
        This method returns if translation should happen inside of Payment Rules.
        Returns:
        if translation should happen inside of Payment Rules
      • getMessageLogger

        public static final com.ibm.ras.RASMessageLogger getMessageLogger(java.lang.String loggerName)
        This method returns the message logger object with the specified logger name. If the logger has not already been created. This method will create it.It's assuming the component name is the same as the logger name and the default Commerce ResourceBundle will be used.
        Parameters:
        loggerName - The name of the logger
        Returns:
        The logger that can be used to write error, warning and informational messages using the public methods in this class
      • createLogger

        public static void createLogger(java.lang.String loggerName,
                                        java.lang.String componentName,
                                        java.lang.String resourceBundleName)
        This method creates a logger with the specified logger name. It's for the specified component and using the specified resource bundle to obtain translated text for each logged message.
        Parameters:
        loggerName - A name to be given the logger than is unique within the Commerce product. If necessary the logger name can be dot-separated to ensure uniqueness (For example, ShoppingCart, payments.MPF)
        componentName - This is the name of your component as you want it to be displayed in the WebSphere log. Component names longer than 13 characters may appear truncated in some log viewers.
        resourceBundleName - The fully-qualified name of the ResourceBundle class or properties file than contains the translated descriptions of each logged message.
      • error

        public static final void error(java.lang.String loggerName,
                                       java.lang.String messageKey,
                                       java.lang.String className,
                                       java.lang.String methodName)
        This method logs an error message that requires no parameters to the WebSphere message log.
        Parameters:
        loggerName - The name that uniquely identifies the message logger
        messageKey - The message key used to find the translated message text from the ResourceBundle assigned by the createLogger() method.
        className - The name of the calling class
        methodName - The name of the calling method
      • error

        public static final void error(java.lang.String loggerName,
                                       java.lang.String messageKey,
                                       java.lang.String className,
                                       java.lang.String methodName,
                                       java.lang.String parm)
        This method logs an error message that requires a single parameter to the WebSphere message log.
        Parameters:
        loggerName - The name that uniquely identifies the message logger
        messageKey - The message key used to find the translated message text from the ResourceBundle assigned by the createLogger() method.
        className - The name of the calling class
        methodName - The name of the calling method
        parm - The parameter to be inserted into the translated message description.
      • error

        public static final void error(java.lang.String loggerName,
                                       java.lang.String messageKey,
                                       java.lang.String className,
                                       java.lang.String methodName,
                                       java.lang.Object parm)
        This method logs an error message that requires a single parameter to the WebSphere message log.
        Parameters:
        loggerName - The name that uniquely identifies the message logger
        messageKey - The message key used to find the translated message text from the ResourceBundle assigned by the createLogger() method.
        className - The name of the calling class
        methodName - The name of the calling method
        parm - The parameter to be inserted into the translated message description.
      • error

        public static final void error(java.lang.String loggerName,
                                       java.lang.String messageKey,
                                       java.lang.String className,
                                       java.lang.String methodName,
                                       java.lang.Object[] parms)
        This method logs an error message that requires an arbitrary number of parameters to the WebSphere message log.
        Parameters:
        loggerName - The name that uniquely identifies the message logger
        messageKey - The message key used to find the translated message text from the ResourceBundle assigned by the createLogger() method.
        className - The name of the calling class
        methodName - the name of the calling method
        parms - The parameters to be inserted into the translated message description. The WebSphere message facility will use the MessageFormat class to create the message description using these parameters.
      • errorText

        public static final void errorText(java.lang.String loggerName,
                                           java.lang.String className,
                                           java.lang.String methodName,
                                           java.lang.String text)
        This method logs an error message that requires an arbitrary number of parameters to the WebSphere message log.
        Parameters:
        loggerName - The name that uniquely identifies the message logger
        className - The name of the calling class
        methodName - The name of the calling method
        text - The translated message text
      • info

        public static final void info(java.lang.String loggerName,
                                      java.lang.String messageKey,
                                      java.lang.String className,
                                      java.lang.String methodName)
        This method logs an informational message that requires no parameters to the WebSphere message log.
        Parameters:
        loggerName - The name that uniquely identifies the message logger
        messageKey - The message key used to find the translated message text from the ResourceBundle assigned by the createLogger() method.
        className - The name of the calling class
        methodName - The name of the calling method
      • info

        public static final void info(java.lang.String loggerName,
                                      java.lang.String messageKey,
                                      java.lang.String className,
                                      java.lang.String methodName,
                                      java.lang.String parm)
        This method logs an informational message that requires a single parameter to the WebSphere message log.
        Parameters:
        loggerName - The name that uniquely identifies the message logger
        messageKey - The message key used to find the translated message text from the ResourceBundle assigned by the createLogger() method.
        className - The name of the calling class
        methodName - The name of the calling method
        parm - The parameter to be inserted into the translated message description.
      • info

        public static final void info(java.lang.String loggerName,
                                      java.lang.String messageKey,
                                      java.lang.String className,
                                      java.lang.String methodName,
                                      java.lang.Object[] parms)
        This method logs an informational message to the WebSphere message log.
        Parameters:
        loggerName - The name that uniquely identifies the message logger
        messageKey - The message key used to find the translated message text from the ResourceBundle assigned by the createLogger() method.
        className - The name of the calling class
        methodName - The name of the calling method
        parms - The parameters to be inserted into the translated message description. The WebSphere message facility will use the MessageFormat class to create the message description using these parameters.
      • info

        public static final void info(java.lang.String loggerName,
                                      java.lang.String messageKey,
                                      java.lang.String className,
                                      java.lang.String methodName,
                                      java.lang.Object parm)
        This method logs an informational message to the WebSphere message log.
        Parameters:
        loggerName - The name that uniquely identifies the message logger
        messageKey - The message key used to find the translated message text from the ResourceBundle assigned by the createLogger() method.
        className - The name of the calling class
        methodName - The name of the calling method
        parms - The parameters to be inserted into the translated message description. The WebSphere message facility will use the MessageFormat class to create the message description using these parameters.
      • infoText

        public static final void infoText(java.lang.String loggerName,
                                          java.lang.String className,
                                          java.lang.String methodName,
                                          java.lang.String text)
        This method logs an informational message to the WebSphere message log.
        Parameters:
        loggerName - The name that uniquely identifies the message logger
        className - The name of the calling class
        methodName - The name of the calling method
        text - The translated message text
      • warn

        public static final void warn(java.lang.String loggerName,
                                      java.lang.String messageKey,
                                      java.lang.String className,
                                      java.lang.String methodName)
        This method logs a warning message that requires no parameters to the WebSphere message log.
        Parameters:
        loggerName - The name that uniquely identifies the message logger
        messageKey - The message key used to find the translated message text from the ResourceBundle assigned by the createLogger() method.
        className - The name of the calling class
        methodName - The name of the calling method
      • warn

        public static final void warn(java.lang.String loggerName,
                                      java.lang.String messageKey,
                                      java.lang.String className,
                                      java.lang.String methodName,
                                      java.lang.String parm)
        This method logs a warning message that requires a single parameter to the WebSphere message log.
        Parameters:
        loggerName - The name that uniquely identifies the message logger
        messageKey - The message key used to find the translated message text from the ResourceBundle assigned by the createLogger() method.
        className - The name of the calling class
        methodName - The name of the calling method
        parm - The parameter to be inserted into the translated message description.
      • warn

        public static final void warn(java.lang.String loggerName,
                                      java.lang.String messageKey,
                                      java.lang.String className,
                                      java.lang.String methodName,
                                      java.lang.Object[] parms)
        This method logs a warning message to the WebSphere message log.
        Parameters:
        loggerName - The name that uniquely identifies the message logger
        messageKey - The message key used to find the translated message text from the ResourceBundle assigned by the createLogger() method.
        className - The name of the calling class
        methodName - The name of the calling method
        parms - The parameters to be inserted into the translated message description. The WebSphere message facility will use the MessageFormat class to create the message description using these parameters.
      • warnText

        public static final void warnText(java.lang.String loggerName,
                                          java.lang.String className,
                                          java.lang.String methodName,
                                          java.lang.String text)
        This method logs a warning message to the WebSphere message log.
        Parameters:
        loggerName - The name that uniquely identifies the message logger
        className - The name of the calling class
        methodName - The name of the calling method
        text - The translated message text