|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sodius.mdw.core.util.log.AbstractLogger
public abstract class AbstractLogger
Skeletal implementation of the Logger interface.
Subclasses should generally only have to implement the log() method,
as any other logging facility (debug(), error(), etc.)
is redirected to this method using the corresponding Level information.
Clients may subclass this class.
| Constructor Summary | |
|---|---|
AbstractLogger()
|
|
| Method Summary | |
|---|---|
protected String |
createMessage(Object message,
String filename,
int line,
int column)
Creates a log string based on the specified message and file location. |
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. |
protected abstract void |
log(Level level,
Object message,
Throwable error)
Ask to log the specified message and error. |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractLogger()
| Method Detail |
|---|
public Level getLevel()
LoggerINFO.
getLevel in interface Loggernull).public void setLevel(Level level)
Logger
setLevel in interface Loggerlevel - the new level to use.
protected String createMessage(Object message,
String filename,
int line,
int column)
message - the information to log (usually a String)filename - the current file from which this message originates.line - the current file line number.column - the current file column number.
protected abstract void log(Level level,
Object message,
Throwable error)
level - the log level (known to be loggable).message - the information to log (usually a String), maybe null.error - an exception to log, maybe null.public boolean isLoggable(Level level)
Logger
isLoggable in interface Loggerlevel - a message logging level.
true if the given message level is currently being logged.public void debug(Object message)
LoggerDebug messages are used to assist in debugging problems that may be associated with particular configurations.
debug in interface Loggermessage - the information to log (usually a String)
public void debug(Object message,
String filename,
int lineNumber,
int columnNumber)
LoggerThis 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.
debug in interface Loggermessage - 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.
public void debug(Object message,
Throwable error)
LoggerDebug messages are used to assist in debugging problems that may be associated with particular configurations.
debug in interface Loggermessage - the information to log (usually a String), maybe nullerror - an exception to log.public void info(Object message)
LoggerInfo messages should only be used for reasonably significant messages that will make sense to end users and system admins.
info in interface Loggermessage - the information to log (usually a String)
public void info(Object message,
String filename,
int lineNumber,
int columnNumber)
LoggerThis 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.
info in interface Loggermessage - 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.
public void info(Object message,
Throwable error)
LoggerInfo messages should only be used for reasonably significant messages that will make sense to end users and system admins.
info in interface Loggermessage - the information to log (usually a String), maybe nullerror - an exception to log.public void warning(Object message)
LoggerIn general, warning messages should describe events that will be of interest to end users or system managers, or which indicate potential problems.
warning in interface Loggermessage - the information to log (usually a String)
public void warning(Object message,
String filename,
int lineNumber,
int columnNumber)
LoggerThis 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.
warning in interface Loggermessage - 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.
public void warning(Object message,
Throwable error)
LoggerIn general, warning messages should describe events that will be of interest to end users or system managers, or which indicate potential problems.
warning in interface Loggermessage - the information to log (usually a String), maybe nullerror - an exception to log.public void error(Object message)
LoggerIn 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.
error in interface Loggermessage - the information to log (usually a String)
public void error(Object message,
String filename,
int lineNumber,
int columnNumber)
LoggerThis 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.
error in interface Loggermessage - 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.
public void error(Object message,
Throwable error)
LoggerIn 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.
error in interface Loggermessage - the information to log (usually a String), maybe nullerror - an exception to log.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||