org.opends.server.loggers
Class ThreadFilterTextErrorLogPublisher

java.lang.Object
  extended by org.opends.server.api.ErrorLogPublisher<ErrorLogPublisherCfg>
      extended by org.opends.server.loggers.ThreadFilterTextErrorLogPublisher

public class ThreadFilterTextErrorLogPublisher
extends ErrorLogPublisher<ErrorLogPublisherCfg>

This class provides an implementation of an error logger where only messages generated by a specified thread is actually logged.


Field Summary
 
Fields inherited from class org.opends.server.api.ErrorLogPublisher
defaultSeverities, definedSeverities
 
Constructor Summary
ThreadFilterTextErrorLogPublisher(java.lang.Thread thread, TextWriter writer)
          Construct a new instance with the provided settings.
 
Method Summary
 void close()
          Close this publisher.
 DN getDN()
          Gets the DN of the configuration entry for this error log publisher.
 void initializeErrorLogPublisher(ErrorLogPublisherCfg config)
          Initializes this access publisher provider based on the information in the provided debug publisher configuration.
 void logError(Message message)
          Writes a message to the error log using the provided information.
 
Methods inherited from class org.opends.server.api.ErrorLogPublisher
isConfigurationAcceptable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadFilterTextErrorLogPublisher

public ThreadFilterTextErrorLogPublisher(java.lang.Thread thread,
                                         TextWriter writer)
Construct a new instance with the provided settings.

Parameters:
thread - The thread to log from.
writer - The writer used to write the messages.
Method Detail

initializeErrorLogPublisher

public void initializeErrorLogPublisher(ErrorLogPublisherCfg config)
                                 throws ConfigException,
                                        InitializationException
Initializes this access publisher provider based on the information in the provided debug publisher configuration.

Specified by:
initializeErrorLogPublisher in class ErrorLogPublisher<ErrorLogPublisherCfg>
Parameters:
config - The error publisher configuration that contains the information to use to initialize this error publisher.
Throws:
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.

close

public void close()
Close this publisher.

Specified by:
close in class ErrorLogPublisher<ErrorLogPublisherCfg>

logError

public void logError(Message message)
Writes a message to the error log using the provided information. The message's category and severity information will be used to determine whether to actually log this message.

Specified by:
logError in class ErrorLogPublisher<ErrorLogPublisherCfg>
Parameters:
message - The message to be logged.

getDN

public DN getDN()
Gets the DN of the configuration entry for this error log publisher.

Specified by:
getDN in class ErrorLogPublisher<ErrorLogPublisherCfg>
Returns:
The configuration entry DN.