public class ErrorLogger extends AbstractLogger<ErrorLogPublisher<ErrorLogPublisherCfg>,ErrorLogPublisherCfg>
AbstractLogger.LoggerStorage<P extends LogPublisher<C>,C extends LogPublisherCfg>| Modifier and Type | Method and Description |
|---|---|
void |
addLogPublisher(ErrorLogPublisher<ErrorLogPublisherCfg> publisher)
Add a log publisher to the logger.
|
static ErrorLogger |
getInstance()
Retrieve the singleton instance of this class.
|
protected ClassPropertyDefinition |
getJavaClassPropertyDefinition()
Returns the java
ClassPropertyDefinition for the current logger. |
protected Collection<ErrorLogPublisher<ErrorLogPublisherCfg>> |
getLogPublishers()
Returns the log publishers.
|
static boolean |
isEnabledFor(String category,
Severity severity)
Check if logging is enabled for the provided category and severity.
|
static void |
log(String category,
Severity severity,
LocalizableMessage message,
Throwable exception)
Writes a message to the error log using the provided information.
|
void |
removeAllLogPublishers()
Removes all existing log publishers from the logger.
|
boolean |
removeLogPublisher(ErrorLogPublisher<ErrorLogPublisherCfg> publisher)
Remove a log publisher from the logger.
|
applyConfigurationAdd, applyConfigurationChange, applyConfigurationDelete, initializeLogger, isConfigurationAddAcceptable, isConfigurationChangeAcceptable, isConfigurationDeleteAcceptablepublic static ErrorLogger getInstance()
protected ClassPropertyDefinition getJavaClassPropertyDefinition()
ClassPropertyDefinition for the current logger.getJavaClassPropertyDefinition in class AbstractLogger<ErrorLogPublisher<ErrorLogPublisherCfg>,ErrorLogPublisherCfg>ClassPropertyDefinition for the current logger.protected Collection<ErrorLogPublisher<ErrorLogPublisherCfg>> getLogPublishers()
getLogPublishers in class AbstractLogger<ErrorLogPublisher<ErrorLogPublisherCfg>,ErrorLogPublisherCfg>LogPublisherspublic static void log(String category, Severity severity, LocalizableMessage message, Throwable exception)
Category is defined using either short name (used for classes in well
defined packages) or fully qualified classname. Conversion to short name is
done automatically when loggers are created, see
LoggingCategoryNames for list of existing short names.
category - The category of the message, which is either a classname or a
simple category name defined in LoggingCategoryNames
class.severity - The severity of the message.message - The message to be logged.exception - The exception to be logged. May be null.public static boolean isEnabledFor(String category, Severity severity)
category - The category of the logging event, which is either a classname or
a simple category name defined in LoggingCategoryNames
class.severity - The severity of logging event.true if logger is enabledpublic final void addLogPublisher(ErrorLogPublisher<ErrorLogPublisherCfg> publisher)
AbstractLoggeraddLogPublisher in class AbstractLogger<ErrorLogPublisher<ErrorLogPublisherCfg>,ErrorLogPublisherCfg>publisher - The log publisher to add.public final boolean removeLogPublisher(ErrorLogPublisher<ErrorLogPublisherCfg> publisher)
AbstractLoggerremoveLogPublisher in class AbstractLogger<ErrorLogPublisher<ErrorLogPublisherCfg>,ErrorLogPublisherCfg>publisher - The log publisher to remove.public final void removeAllLogPublishers()
AbstractLoggerremoveAllLogPublishers in class AbstractLogger<ErrorLogPublisher<ErrorLogPublisherCfg>,ErrorLogPublisherCfg>Copyright © 2010-2018 ForgeRock AS. All Rights Reserved.