org.apache.qpid.server.logging
Interface RootMessageLogger

All Known Implementing Classes:
AbstractRootMessageLogger, CompositeStartupMessageLogger, Log4jMessageLogger, NullRootMessageLogger, SystemOutMessageLogger

public interface RootMessageLogger

The RootMessageLogger is used by the LogActors to query if logging is enabled for the requested message and to provide the actual message that should be logged.


Method Summary
 boolean isEnabled()
          Determine whether the MessageLogger is enabled
 boolean isMessageEnabled(LogActor actor, LogSubject subject, String logHierarchy)
          Determine if the LogSubject and the LogActor should be generating log messages.
 boolean isMessageEnabled(LogActor actor, String logHierarchy)
          Determine if the LogActor should be generating log messages.
 void rawMessage(String message, String logHierarchy)
          Log the raw message to the configured logger.
 void rawMessage(String message, Throwable throwable, String logHierarchy)
          Log the raw message to the configured logger.
 

Method Detail

isEnabled

boolean isEnabled()
Determine whether the MessageLogger is enabled

Returns:
boolean true if enabled.

isMessageEnabled

boolean isMessageEnabled(LogActor actor,
                         LogSubject subject,
                         String logHierarchy)
Determine if the LogSubject and the LogActor should be generating log messages.

Parameters:
actor - The actor requesting the logging
subject - The subject of this log request
logHierarchy - The log hierarchy for this request
Returns:
boolean true if the message should be logged.

isMessageEnabled

boolean isMessageEnabled(LogActor actor,
                         String logHierarchy)
Determine if the LogActor should be generating log messages.

Parameters:
actor - The actor requesting the logging
logHierarchy - The log hierarchy for this request
Returns:
boolean true if the message should be logged.

rawMessage

void rawMessage(String message,
                String logHierarchy)
Log the raw message to the configured logger.

Parameters:
message - The message to log
logHierarchy - The log hierarchy for this request

rawMessage

void rawMessage(String message,
                Throwable throwable,
                String logHierarchy)
Log the raw message to the configured logger. Along with a formated stack trace from the Throwable.

Parameters:
message - The message to log
throwable - Optional Throwable that should provide stact trace
logHierarchy - The log hierarchy for this request


Licensed to the Apache Software Foundation