com.sodius.mdw.core.util.log
Interface Logger

All Known Implementing Classes:
AbstractLogger, FileLogger, LoggerSet, LogRecorder, SystemStreamLogger

public interface Logger

Provides facilities to log errors and warnings, as well as debugging information.

One can customize the loggers used by evaluation and model loading/writing, by subclassing this interface and registering the implementation to the workbench configuration.

Clients may implement this interface.

See Also:
WorkbenchConfiguration.getLogger()

Method Summary
 void debug(Object message)
          Logs a debug level message.
 void debug(Object message, String filename, int lineNumber, int columnNumber)
          Logs a debug level message.
 void debug(Object message, Throwable error)
          Logs a debug level message.
 void error(Object message)
          Logs an error level message.
 void error(Object message, String filename, int lineNumber, int columnNumber)
          Logs an error level message.
 void error(Object message, Throwable error)
          Logs an error level message.
 Level getLevel()
          Get the log Level that has been specified for this logger.
 void info(Object message)
          Logs an info level message.
 void info(Object message, String filename, int lineNumber, int columnNumber)
          Logs an info level message, with the specified file location.
 void info(Object message, Throwable error)
          Logs an info level message.
 boolean isLoggable(Level level)
          Check if a message of the given level would actually be logged by this logger.
 void setLevel(Level level)
          Set the log level specifying which message levels will be logged by this logger.
 void warning(Object message)
          Logs a warning level message.
 void warning(Object message, String filename, int lineNumber, int columnNumber)
          Logs a warning level message.
 void warning(Object message, Throwable error)
          Logs a warning level message.
 

Method Detail

getLevel

Level getLevel()
Get the log Level that has been specified for this logger. The default level is INFO.

Returns:
the log Level that has been specified for this logger (never null).

setLevel

void setLevel(Level level)
Set the log level specifying which message levels will be logged by this logger. Message levels lower than this value will be discarded.

Parameters:
level - the new level to use.

isLoggable

boolean isLoggable(Level level)
Check if a message of the given level would actually be logged by this logger. This check is based on the logger effective level.

Parameters:
level - a message logging level.
Returns:
true if the given message level is currently being logged.

debug

void debug(Object message)
Logs a debug level message.

Debug messages are used to assist in debugging problems that may be associated with particular configurations.

Parameters:
message - the information to log (usually a String)

debug

void debug(Object message,
           String filename,
           int lineNumber,
           int columnNumber)
Logs a debug level message.

This method is typically used when parsing a model file and when a parsing debug information must be logged.

Debug messages are used to assist in debugging problems that may be associated with particular configurations.

Parameters:
message - the information to log (usually a String)
filename - the current file from which this message originates.
lineNumber - the current file line number.
columnNumber - the current file column number.

debug

void debug(Object message,
           Throwable error)
Logs a debug level message.

Debug messages are used to assist in debugging problems that may be associated with particular configurations.

Parameters:
message - the information to log (usually a String), maybe null
error - an exception to log.

info

void info(Object message)
Logs an info level message.

Info messages should only be used for reasonably significant messages that will make sense to end users and system admins.

Parameters:
message - the information to log (usually a String)

info

void info(Object message,
          String filename,
          int lineNumber,
          int columnNumber)
Logs an info level message, with the specified file location.

This method is typically used when parsing a model file and when a parsing information must be logged.

Info messages should only be used for reasonably significant messages that will make sense to end users and system admins.

Parameters:
message - the information to log (usually a String)
filename - the current file from which this message originates.
lineNumber - the current file line number.
columnNumber - the current file column number.

info

void info(Object message,
          Throwable error)
Logs an info level message.

Info messages should only be used for reasonably significant messages that will make sense to end users and system admins.

Parameters:
message - the information to log (usually a String), maybe null
error - an exception to log.

warning

void warning(Object message)
Logs a warning level message.

In general, warning messages should describe events that will be of interest to end users or system managers, or which indicate potential problems.

Parameters:
message - the information to log (usually a String)

warning

void warning(Object message,
             String filename,
             int lineNumber,
             int columnNumber)
Logs a warning level message.

This method is typically used when parsing a model file and when a parsing warning must be logged.

In general, warning messages should describe events that will be of interest to end users or system managers, or which indicate potential problems.

Parameters:
message - the information to log (usually a String)
filename - the current file from which this message originates.
lineNumber - the current file line number.
columnNumber - the current file column number.

warning

void warning(Object message,
             Throwable error)
Logs a warning level message.

In general, warning messages should describe events that will be of interest to end users or system managers, or which indicate potential problems.

Parameters:
message - the information to log (usually a String), maybe null
error - an exception to log.

error

void error(Object message)
Logs an error level message.

In general, error messages should describe events that are of considerable importance and which will prevent normal program execution. They should be reasonably intelligible to end users and to system administrators.

Parameters:
message - the information to log (usually a String)

error

void error(Object message,
           String filename,
           int lineNumber,
           int columnNumber)
Logs an error level message.

This method is typically used when parsing a model file and when a parsing recoverable error must be logged.

In general, error messages should describe events that are of considerable importance and which will prevent normal program execution. They should be reasonably intelligible to end users and to system administrators.

Parameters:
message - the information to log (usually a String)
filename - the current file from which this message originates.
lineNumber - the current file line number.
columnNumber - the current file column number.

error

void error(Object message,
           Throwable error)
Logs an error level message.

In general, error messages should describe events that are of considerable importance and which will prevent normal program execution. They should be reasonably intelligible to end users and to system administrators.

Parameters:
message - the information to log (usually a String), maybe null
error - an exception to log.