public class LogHandler extends Object
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 |
|---|
LogHandler(Logger log)
Constructor that takes a log
|
LogHandler(Logger log,
boolean status)
Constructor that takes a log
|
LogHandler(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(String message,
LoggingLevel messageLevel)
Log a message at the supplied level
|
void |
logBasic(String message)
Log at the basic level
|
void |
logDebug(String message)
Log at the debugging level
|
void |
logDetailed(String message)
Log at the detailed level
|
void |
logError(String message,
Exception cause)
Log an error
|
void |
logLow(String message)
Log at the low level
|
void |
logWarning(String message)
Log a warning
|
void |
setLogger(Logger log)
Set the log wrap
|
void |
setLoggingLevel(LoggingLevel level)
Set the logging level to use
|
static String |
stackTraceToString(Throwable throwable)
Utility method to convert a stack trace to a String
|
void |
statusMessage(String message)
Output a status message
|
public LogHandler(Step source)
Step. Uses the log from the stepsource - the source Steppublic LogHandler(Logger log)
log - the log to wrappublic LogHandler(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 String stackTraceToString(Throwable throwable)
throwable - the Throwable to convert to a stack trace stringpublic void setLogger(Logger log)
log - the log to wrappublic Logger getLog()
public LoggingLevel getLoggingLevel()
public void setLoggingLevel(LoggingLevel level)
level - the level to usepublic void logLow(String message)
message - the message to logpublic void logBasic(String message)
message - the message to logpublic void logDetailed(String message)
message - the message to logpublic void logDebug(String message)
message - the message to logpublic void logWarning(String message)
message - the message to logpublic void logError(String message, Exception cause)
message - the message to logcause - the cause of the errorpublic void statusMessage(String message)
message - the status messagepublic void log(String message, LoggingLevel messageLevel)
message - the message to logmessageLevel - the level to log atCopyright © 2016 University of Waikato, Hamilton, NZ. All Rights Reserved.