|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.loggers.ErrorLogger
public class ErrorLogger
This class defines the wrapper that will invoke all registered error loggers for each type of request received or response sent. If no error log publishers are registered, messages will be directed to standard out.
Constructor Summary | |
---|---|
ErrorLogger()
|
Method Summary | |
---|---|
static void |
addErrorLogPublisher(ErrorLogPublisher publisher)
Add an error log publisher to the error logger. |
ConfigChangeResult |
applyConfigurationAdd(ErrorLogPublisherCfg config)
Adds a new configuration to this add listener. |
ConfigChangeResult |
applyConfigurationChange(ErrorLogPublisherCfg config)
Applies the configuration changes to this change listener. |
ConfigChangeResult |
applyConfigurationDelete(ErrorLogPublisherCfg config)
Deletes an existing configuration from this delete listener. |
static ErrorLogger |
getInstance()
Retrieve the singleton instance of this class. |
void |
initializeErrorLogger(java.util.List<ErrorLogPublisherCfg> configs)
Initializes all the error log publishers. |
boolean |
isConfigurationAddAcceptable(ErrorLogPublisherCfg config,
java.util.List<Message> unacceptableReasons)
Indicates whether the proposed addition of a new configuration is acceptable to this add listener. |
boolean |
isConfigurationChangeAcceptable(ErrorLogPublisherCfg config,
java.util.List<Message> unacceptableReasons)
Indicates whether the proposed change to the configuration is acceptable to this change listener. |
boolean |
isConfigurationDeleteAcceptable(ErrorLogPublisherCfg config,
java.util.List<Message> unacceptableReasons)
Indicates whether the proposed deletion of an existing configuration is acceptable to this delete listener. |
static void |
logError(Message message)
Writes a message to the error log using the provided information. |
static void |
removeAllErrorLogPublishers()
Removes all existing error log publishers from the logger. |
static boolean |
removeErrorLogPublisher(ErrorLogPublisher publisher)
Remove an error log publisher from the error logger. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ErrorLogger()
Method Detail |
---|
public static ErrorLogger getInstance()
public static void addErrorLogPublisher(ErrorLogPublisher publisher)
publisher
- The error log publisher to add.public static boolean removeErrorLogPublisher(ErrorLogPublisher publisher)
publisher
- The error log publisher to remove.
public static void removeAllErrorLogPublishers()
public void initializeErrorLogger(java.util.List<ErrorLogPublisherCfg> configs) throws ConfigException, InitializationException
configs
- The error log publisher configurations.
ConfigException
- If an unrecoverable problem arises in the process of
performing the initialization as a result of the server
configuration.
InitializationException
- If a problem occurs during initialization that is not
related to the server configuration.public boolean isConfigurationAddAcceptable(ErrorLogPublisherCfg config, java.util.List<Message> unacceptableReasons)
isConfigurationAddAcceptable
in interface ConfigurationAddListener<ErrorLogPublisherCfg>
config
- The configuration that will be added.unacceptableReasons
- A list that can be used to hold messages about why the
provided configuration is not acceptable.
true
if the proposed addition is
acceptable, or false
if it is not.public boolean isConfigurationChangeAcceptable(ErrorLogPublisherCfg config, java.util.List<Message> unacceptableReasons)
isConfigurationChangeAcceptable
in interface ConfigurationChangeListener<ErrorLogPublisherCfg>
config
- The new configuration containing the changes.unacceptableReasons
- A list that can be used to hold messages about why the
provided configuration is not acceptable.
true
if the proposed change is
acceptable, or false
if it is not.public ConfigChangeResult applyConfigurationAdd(ErrorLogPublisherCfg config)
applyConfigurationAdd
in interface ConfigurationAddListener<ErrorLogPublisherCfg>
config
- The configuration that will be added.
public ConfigChangeResult applyConfigurationChange(ErrorLogPublisherCfg config)
applyConfigurationChange
in interface ConfigurationChangeListener<ErrorLogPublisherCfg>
config
- The new configuration containing the changes.
public boolean isConfigurationDeleteAcceptable(ErrorLogPublisherCfg config, java.util.List<Message> unacceptableReasons)
isConfigurationDeleteAcceptable
in interface ConfigurationDeleteListener<ErrorLogPublisherCfg>
config
- The configuration that will be deleted.unacceptableReasons
- A list that can be used to hold messages about why the
provided configuration is not acceptable.
true
if the proposed deletion is
acceptable, or false
if it is not.public ConfigChangeResult applyConfigurationDelete(ErrorLogPublisherCfg config)
applyConfigurationDelete
in interface ConfigurationDeleteListener<ErrorLogPublisherCfg>
config
- The existing configuration that will be deleted.
public static void logError(Message message)
message
- The message to be logged.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |