Class LogSubsystem

java.lang.Object
com.netscape.cmscore.logging.LogSubsystem
All Implemented Interfaces:
ISubsystem

public class LogSubsystem extends Object implements ISubsystem
A class representing a log subsystem. The logging component is a framework that handles different types of log types, each represented by an LogFile, and each implements a log plugin. CMS comes with three standard log types: "signedAudit", "system", and "transaction". Each log plugin can be instantiated into log instances. Each log instance can be individually configured and is associated with its own configuration entries in the configuration file.
Author:
thomask, mzhao
  • Field Details

  • Method Details

    • getId

      public String getId()
      Description copied from interface: ISubsystem
      Retrieves the name of this subsystem.
      Specified by:
      getId in interface ISubsystem
      Returns:
      subsystem identifier
    • setId

      public void setId(String id) throws EBaseException
      Description copied from interface: ISubsystem
      Sets specific to this subsystem.
      Specified by:
      setId in interface ISubsystem
      Parameters:
      id - subsystem identifier
      Throws:
      EBaseException - failed to set id
    • init

      public void init(ConfigStore config) throws EBaseException
      Initializes the log subsystem.

      Specified by:
      init in interface ISubsystem
      Parameters:
      config - configuration store
      Throws:
      EBaseException
    • getAuditEvents

      public Collection<String> getAuditEvents()
    • startup

      public void startup() throws EBaseException
      Description copied from interface: ISubsystem
      Notifies this subsystem if owner is in running mode.
      Specified by:
      startup in interface ISubsystem
      Throws:
      EBaseException - failed to start up
    • shutdown

      public void shutdown()
      Stops this subsystem.

      Specified by:
      shutdown in interface ISubsystem
    • getConfigStore

      public LoggingConfig getConfigStore()
      Returns the root configuration storage of this system.

      Specified by:
      getConfigStore in interface ISubsystem
      Returns:
      configuration store of this subsystem
    • getInstance

      public static LogSubsystem getInstance()
      Retrieves singleton: the LogSubsystem.
    • getLogPluginName

      public String getLogPluginName(LogEventListener log)
      Retrieve plugin name (implementation name) of the log event listener. If no plug name found, an empty string is returned
      Parameters:
      log - the log event listener
      Returns:
      the log event listener's plugin name
    • getLogInstance

      public LogEventListener getLogInstance(String insName)
      Retrieve the log event listener by instance name
      Parameters:
      insName - the log instance name in String
      Returns:
      the log instance in LogEventListener
    • getLogPlugins

      public Hashtable<String,LogPlugin> getLogPlugins()
      get the list of log plugins that are available
      Returns:
      log plugins in a Hashtable. Each entry in the Hashtable contains the name/value pair of pluginName/LogPlugin
      See Also:
    • getLogInsts

      public Hashtable<String,LogEventListener> getLogInsts()
      get the list of log instances that are available
      Returns:
      log instances in a Hashtable. Each entry in the Hashtable contains the name/value pair of instName/LogEventListener
      See Also:
    • getLogDefaultParams

      public Vector<String> getLogDefaultParams(String implName) throws ELogException
      Get the default configuration parameter names associated with a plugin. It is used by administration servlet to handle log configuration when a new log instance is added.
      Parameters:
      implName - The implementation name for which the configuration parameters are to be configured
      Returns:
      a Vector of default configuration paramter names associated with this log plugin
      Throws:
      ELogException - when instantiation of the plugin implementation fails.
    • getLogInstanceParams

      public Vector<String> getLogInstanceParams(String insName) throws ELogException
      Get the default configuration parameter names associated with a log instance. It is used by administration servlet to handle log instance configuration.
      Parameters:
      insName - The instance name for which the configuration parameters are to be configured
      Returns:
      a Vector of default configuration paramter names associated with this log instance.
      Throws:
      ELogException