public class LogManager extends java.lang.Object implements LogHandler
weka.gui.Logger
and filters log messages according
to the set logging level. Note that warnings and errors reported via the
logWarning() and logError() methods will always be output regardless of the
logging level set.Constructor and Description |
---|
LogManager(Logger log)
Constructor that takes a log
|
LogManager(Logger log,
boolean status)
Constructor that takes a log
|
LogManager(Step source)
Constructor that takes a
Step . |
Modifier and Type | Method and Description |
---|---|
Logger |
getLog()
Get the wrapped log
|
LoggingLevel |
getLoggingLevel()
Get the logging level in use
|
void |
log(java.lang.String message,
LoggingLevel messageLevel)
Log a message at the supplied level
|
void |
logBasic(java.lang.String message)
Log at the basic level
|
void |
logDebug(java.lang.String message)
Log at the debugging level
|
void |
logDetailed(java.lang.String message)
Log at the detailed level
|
void |
logError(java.lang.String message,
java.lang.Exception cause)
Log an error
|
void |
logLow(java.lang.String message)
Log at the low level
|
void |
logWarning(java.lang.String message)
Log a warning
|
void |
setLog(Logger log)
Set the log wrap
|
void |
setLoggingLevel(LoggingLevel level)
Set the logging level to use
|
static java.lang.String |
stackTraceToString(java.lang.Throwable throwable)
Utility method to convert a stack trace to a String
|
void |
statusMessage(java.lang.String message)
Output a status message
|
public LogManager(Step source)
Step
. Uses the log from the stepsource
- the source Step
public LogManager(Logger log)
log
- the log to wrappublic LogManager(Logger log, boolean status)
log
- the log to wrapstatus
- true if warning and error messages should be output to the
status area as well as to the logpublic static java.lang.String stackTraceToString(java.lang.Throwable throwable)
throwable
- the Throwable
to convert to a stack trace stringpublic void setLog(Logger log)
setLog
in interface LogHandler
log
- the log to wrappublic Logger getLog()
getLog
in interface LogHandler
public LoggingLevel getLoggingLevel()
public void setLoggingLevel(LoggingLevel level)
level
- the level to usepublic void logLow(java.lang.String message)
message
- the message to logpublic void logBasic(java.lang.String message)
message
- the message to logpublic void logDetailed(java.lang.String message)
message
- the message to logpublic void logDebug(java.lang.String message)
message
- the message to logpublic void logWarning(java.lang.String message)
message
- the message to logpublic void logError(java.lang.String message, java.lang.Exception cause)
message
- the message to logcause
- the cause of the errorpublic void statusMessage(java.lang.String message)
message
- the status messagepublic void log(java.lang.String message, LoggingLevel messageLevel)
message
- the message to logmessageLevel
- the level to log at