public class ThreadFilterTextErrorLogPublisher extends ErrorLogPublisher<org.forgerock.opendj.server.config.server.ErrorLogPublisherCfg>
defaultSeverities, definedSeverities
Constructor and Description |
---|
ThreadFilterTextErrorLogPublisher(Thread thread,
TextWriter writer)
Construct a new instance with the provided settings.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close this publisher.
|
org.forgerock.opendj.ldap.Dn |
getDN()
Gets the DN of the configuration entry for this log publisher.
|
void |
initializeLogPublisher(org.forgerock.opendj.server.config.server.ErrorLogPublisherCfg config,
ServerContext serverContext)
Initializes this publisher provider based on the information in the
provided debug publisher configuration.
|
boolean |
isEnabledFor(String category,
Severity severity)
Check if a message should be logged for the provided category and severity.
|
void |
log(String category,
Severity severity,
LocalizableMessage message,
Throwable exception)
Writes a message to the error log using the provided information.
|
isConfigurationAcceptable
public ThreadFilterTextErrorLogPublisher(Thread thread, TextWriter writer)
thread
- The thread to log from.writer
- The writer used to write the messages.public void initializeLogPublisher(org.forgerock.opendj.server.config.server.ErrorLogPublisherCfg config, ServerContext serverContext) throws org.forgerock.opendj.config.server.ConfigException, InitializationException
LogPublisher
config
- The publisher configuration that contains the information to use
to initialize this publisher.serverContext
- The server context.org.forgerock.opendj.config.server.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 void close()
LogPublisher
public void log(String category, Severity severity, LocalizableMessage message, Throwable exception)
ErrorLogPublisher
The category and severity information are used to determine whether to actually log this message.
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.
log
in class ErrorLogPublisher<org.forgerock.opendj.server.config.server.ErrorLogPublisherCfg>
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 boolean isEnabledFor(String category, Severity severity)
ErrorLogPublisher
isEnabledFor
in class ErrorLogPublisher<org.forgerock.opendj.server.config.server.ErrorLogPublisherCfg>
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.true
if the message should be logged, false
otherwisepublic org.forgerock.opendj.ldap.Dn getDN()
LogPublisher
Copyright © 2010-2017 ForgeRock AS. All Rights Reserved.