com.ibm.commerce.ras

Class LogConfiguration

  • java.lang.Object
    • com.ibm.commerce.ras.LogConfiguration


  • public final class LogConfiguration
    extends java.lang.Object
    Stores the configuration data for WCS Logging Service. The WCS Logging Service retrieves all the configuration data from a unique instance of LogConfiguration class.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class and Description
      static class  LogConfiguration.Parameters
      Defines the parameters used for WCS Logging Service configuration
    • Field Summary

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

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      static void _main(java.lang.String[] args)
      Runs a testing.
      void disableLoadingXMLNode()
      Disables loading the XML node
      org.w3c.dom.Node getConfigNode()
      Returns the configuration node return configuration node
      boolean getJrasEnabled()
      Gets the jrasEnabled.
      LogFile getLogFile()
      Returns the log file implementation to write the log.
      java.util.Vector getProperties(java.lang.String propertyKey)
      Returns Vector of properties based on the specified key
      static LogConfiguration getUniqueInstance()
      Gets a unique instance of LogConfiguration.
      void initialize(java.io.InputStream xmlConfigFileName, java.lang.String instanceName)
      Initializes the log configuration by parsing the XML.
      void initialize(java.io.InputStream xmlConfigFileName, java.lang.String instanceName, boolean jras)
      Initializes the log configuration by parsing the XML
      void initialize(java.lang.String xmlConfigFileName)
      Initializes the log configuration.
      void initialize(java.lang.String xmlConfigFileName, LogFile logFile)
      Initializes the log configuration.
      void initialize(java.lang.String xmlConfigFileName, java.lang.String instanceName)
      Initializes the log configuration by parsing the XML.
      void initialize(java.lang.String xmlConfigFileName, java.lang.String instanceName, boolean jras)
      Initializes the log configuration by parsing the XML
      static void main(java.lang.String[] args)
      Runs a testing.
      void messageEnable(boolean enable)
      Loads the status of message logging.
      void reset()
      Reset the logging facility to pickup the new changes.
      void setCompactFormat(boolean enableCompact)
      Sets the compact format of message log.
      void setConfigNode(org.w3c.dom.Node newConfigNode)
      Sets the configuration node.
      void setFileDateStamped(java.lang.String enabled)
      Sets whether the file should be date stamped when created.
      void setInstanceName(java.lang.String instanceName)
      Sets the instance name.
      void setJrasEnabled(boolean jrasEnabled)
      Sets the JRas enabled status.
      void setLogFile(LogFile file)
      Sets the log file implementation.
      void setLogFileName(java.lang.String logFileName)
      Sets the file name of the log file.
      void setLogFileSize(long MBsize)
      Sets the file size of the Log file
      void setLogSeverity(java.util.Vector severities)
      Sets the message logging severities.
      void setNotificationClassName(java.lang.String className)
      Sets the notification class name.
      void setNotificationEnable(boolean enableNotification)
      Sets the status of error notification.
      void setTraceComponents(java.util.Vector components)
      Sets the status of tracing components.
      void setTraceFileName(java.lang.String logFileName)
      Sets the file name of the Trace file.
      void setTraceFileSize(long MBsize)
      Sets the file size of the Trace file.
      void traceEnable(boolean enable)
      Sets the status of tracing subsystem.
      • 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

      • disableLoadingXMLNode

        public void disableLoadingXMLNode()
        Disables loading the XML node
      • getConfigNode

        public org.w3c.dom.Node getConfigNode()
        Returns the configuration node return configuration node
      • getProperties

        public java.util.Vector getProperties(java.lang.String propertyKey)
        Returns Vector of properties based on the specified key
        Parameters:
        propertyKey - properties key
        Returns:
        vector of properties
      • getUniqueInstance

        public static LogConfiguration getUniqueInstance()
        Gets a unique instance of LogConfiguration.
        Returns:
        unique instance of LogConfiguration
      • initialize

        public void initialize(java.lang.String xmlConfigFileName)
        Initializes the log configuration.
        Parameters:
        xmlConfigFileName - log configuration file
      • initialize

        public void initialize(java.lang.String xmlConfigFileName,
                               LogFile logFile)
        Initializes the log configuration.
        Parameters:
        xmlConfigFileName - log configuration file
      • initialize

        public void initialize(java.lang.String xmlConfigFileName,
                               java.lang.String instanceName)
        Initializes the log configuration by parsing the XML.
        Parameters:
        xmlConfigFileName - log configuration file
        instanceName - instance name
      • initialize

        public void initialize(java.io.InputStream xmlConfigFileName,
                               java.lang.String instanceName)
        Initializes the log configuration by parsing the XML.
        Parameters:
        xmlConfigFileName - log configuration file
        instanceName - instance name
      • initialize

        public void initialize(java.lang.String xmlConfigFileName,
                               java.lang.String instanceName,
                               boolean jras)
        Initializes the log configuration by parsing the XML
        Parameters:
        xmlConfigFileName - log configuration file
        instanceName - instance name
        jras - true if JRas is used as logging mechanism; false otherwise
      • initialize

        public void initialize(java.io.InputStream xmlConfigFileName,
                               java.lang.String instanceName,
                               boolean jras)
        Initializes the log configuration by parsing the XML
        Parameters:
        xmlConfigFileName - log configuration file
        instanceName - instance name
        jras - true if JRas is used as logging mechanism; false otherwise
      • _main

        public static void _main(java.lang.String[] args)
        Runs a testing.
      • main

        public static void main(java.lang.String[] args)
        Runs a testing.
      • messageEnable

        public void messageEnable(boolean enable)
        Loads the status of message logging.
        Parameters:
        enable - true if message logging is enabled
      • setCompactFormat

        public void setCompactFormat(boolean enableCompact)
        Sets the compact format of message log.
        Parameters:
        enableCompact - true if compact format is used; false otherwise
      • setConfigNode

        public void setConfigNode(org.w3c.dom.Node newConfigNode)
        Sets the configuration node.
        Parameters:
        newConfigNode - configuration node
      • setInstanceName

        public void setInstanceName(java.lang.String instanceName)
        Sets the instance name.
        Parameters:
        instanceName - instance name
      • setLogFileName

        public void setLogFileName(java.lang.String logFileName)
        Sets the file name of the log file.
        Parameters:
        logFileName - output log file name
      • setLogFileSize

        public void setLogFileSize(long MBsize)
        Sets the file size of the Log file
        Parameters:
        MBsize - maximum size of the log file
      • setLogSeverity

        public void setLogSeverity(java.util.Vector severities)
        Sets the message logging severities.
        Parameters:
        severities - message logging severities
      • setNotificationEnable

        public void setNotificationEnable(boolean enableNotification)
        Sets the status of error notification.
        Parameters:
        enableNotification - true if error notification is enabled; false otherwise
      • setNotificationClassName

        public void setNotificationClassName(java.lang.String className)
        Sets the notification class name.
        Parameters:
        className - The notification class name.
      • setFileDateStamped

        public void setFileDateStamped(java.lang.String enabled)
        Sets whether the file should be date stamped when created.
        Parameters:
        enabled - true if the date should be append when the file is created.
      • setTraceComponents

        public void setTraceComponents(java.util.Vector components)
        Sets the status of tracing components.
        Parameters:
        components - list of tracing components.
      • setTraceFileName

        public void setTraceFileName(java.lang.String logFileName)
        Sets the file name of the Trace file.
        Parameters:
        logFileName - trace file name
      • setTraceFileSize

        public void setTraceFileSize(long MBsize)
        Sets the file size of the Trace file.
        Parameters:
        MBsize - maximum trace file size
      • traceEnable

        public void traceEnable(boolean enable)
        Sets the status of tracing subsystem.
        Parameters:
        enable - true if tracing subsystem is enabled; false otherwise
      • getJrasEnabled

        public boolean getJrasEnabled()
        Gets the jrasEnabled.
        Returns:
        true if JRas is used for logging; false otherwise
      • setJrasEnabled

        public void setJrasEnabled(boolean jrasEnabled)
        Sets the JRas enabled status.
        Parameters:
        jrasEnabled - true if JRas is used for logging; false otherwise
      • reset

        public void reset()
        Reset the logging facility to pickup the new changes.
      • getLogFile

        public LogFile getLogFile()
        Returns the log file implementation to write the log.
        Returns:
        The log file implementation.
      • setLogFile

        public void setLogFile(LogFile file)
        Sets the log file implementation.
        Parameters:
        file - The log file implementation.