Reaction Home

com.zynaptic.reaction.util
Interface ReactorLogTarget

All Known Implementing Classes:
ReactorLogOsgiOptional, ReactorLogSystemOut

public interface ReactorLogTarget

Defines the API used by the Reaction package to submit log messages to a suitable log service. For example, standard POJO environments can use this interface to wrap java.util.logging and OSGi environments can use it to wrap org.osgi.service.log . Note that the log levels are intentionally chosen to match those used by the OSGi logging service.


Field Summary
static int LOG_DEBUG
          Specifies the debug message log level (severity 4).
static int LOG_ERROR
          Specifies the error message log level (severity 1).
static int LOG_INFO
          Specifies the informational message log level (severity 3).
static int LOG_WARNING
          Specifies the warning message log level (severity 2).
 
Method Summary
 void log(int level, java.lang.String msg)
          Logs a message string at the specified severity level.
 void log(int level, java.lang.String msg, java.lang.Throwable thrown)
          Logs message string and accompanying exception information at the specified severity level.
 

Field Detail

LOG_ERROR

static final int LOG_ERROR
Specifies the error message log level (severity 1). A log message at this severity level indicates a failure which may render the reactor service inoperable or unstable.

See Also:
Constant Field Values

LOG_WARNING

static final int LOG_WARNING
Specifies the warning message log level (severity 2). A log message at this severity level indicates a condition which may affect the stability or performance of the reactor service.

See Also:
Constant Field Values

LOG_INFO

static final int LOG_INFO
Specifies the informational message log level (severity 3). Log messages at this severity are used to submit information about normal runtime events to the log.

See Also:
Constant Field Values

LOG_DEBUG

static final int LOG_DEBUG
Specifies the debug message log level (severity 4). Log messages at this severity are only used during debug and should be filtered out during normal operation.

See Also:
Constant Field Values
Method Detail

log

void log(int level,
         java.lang.String msg)
Logs a message string at the specified severity level.

Parameters:
level - This is the severity level at which the message should be logged.
msg - This is the message string which should be included in the log file.

log

void log(int level,
         java.lang.String msg,
         java.lang.Throwable thrown)
Logs message string and accompanying exception information at the specified severity level.

Parameters:
level - This is the severity level at which the message should be logged.
msg - This is the message string which should be included in the log file.
thrown - This is the exception which should be logged with the accompanying message.

Reaction Home