Package com.netscape.cmscore.logging
Class LogSubsystem
java.lang.Object
com.netscape.certsrv.base.Subsystem
com.netscape.cmscore.logging.LogSubsystem
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the root configuration storage of this system.getId()
Retrieves the subsystem identifier.getLogDefaultParams
(String implName) Get the default configuration parameter names associated with a plugin.getLogInstance
(String insName) Retrieve the log event listener by instance namegetLogInstanceParams
(String insName) Get the default configuration parameter names associated with a log instance.get the list of log instances that are availableRetrieve plugin name (implementation name) of the log event listener.get the list of log plugins that are availablevoid
init
(ConfigStore config) Initializes the log subsystem.void
Sets the identifier of this subsystem.void
shutdown()
Stops this subsystem.void
startup()
Notifies this subsystem if owner is in running mode.Methods inherited from class com.netscape.certsrv.base.Subsystem
getCMSEngine, setCMSEngine
-
Field Details
-
logger
public static org.slf4j.Logger logger -
ID
The ID of this component- See Also:
-
PROP_CLASS
- See Also:
-
PROP_PLUGIN
- See Also:
-
mLogPlugins
-
mLogInsts
-
auditEvents
-
-
Constructor Details
-
LogSubsystem
public LogSubsystem()
-
-
Method Details
-
getId
Description copied from class:Subsystem
Retrieves the subsystem identifier. -
setId
Description copied from class:Subsystem
Sets the identifier of this subsystem.- Overrides:
setId
in classSubsystem
- Parameters:
id
- subsystem identifier- Throws:
EBaseException
- failed to set id
-
init
Initializes the log subsystem. -
getAuditEvents
-
startup
Description copied from class:Subsystem
Notifies this subsystem if owner is in running mode.- Overrides:
startup
in classSubsystem
- Throws:
EBaseException
- failed to start up
-
shutdown
public void shutdown()Stops this subsystem. -
getConfigStore
Returns the root configuration storage of this system.- Overrides:
getConfigStore
in classSubsystem
- Returns:
- configuration store of this subsystem
-
getLogPluginName
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
Retrieve the log event listener by instance name- Parameters:
insName
- the log instance name in String- Returns:
- the log instance in LogEventListener
-
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
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
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
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
-