Package weka.knowledgeflow
Class LogManager
- java.lang.Object
-
- weka.knowledgeflow.LogManager
-
- All Implemented Interfaces:
LogHandler
public class LogManager extends java.lang.Object implements LogHandler
Class that wraps aweka.gui.Loggerand 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.- Version:
- $Revision: $
- Author:
- Mark Hall (mhall{[at]}pentaho{[dot]}com)
-
-
Constructor Summary
Constructors Constructor Description LogManager(Logger log)Constructor that takes a logLogManager(Logger log, boolean status)Constructor that takes a logLogManager(Step source)Constructor that takes aStep.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description LoggergetLog()Get the wrapped logLoggingLevelgetLoggingLevel()Get the logging level in usevoidlog(java.lang.String message, LoggingLevel messageLevel)Log a message at the supplied levelvoidlogBasic(java.lang.String message)Log at the basic levelvoidlogDebug(java.lang.String message)Log at the debugging levelvoidlogDetailed(java.lang.String message)Log at the detailed levelvoidlogError(java.lang.String message, java.lang.Exception cause)Log an errorvoidlogLow(java.lang.String message)Log at the low levelvoidlogWarning(java.lang.String message)Log a warningvoidsetLog(Logger log)Set the log wrapvoidsetLoggingLevel(LoggingLevel level)Set the logging level to usestatic java.lang.StringstackTraceToString(java.lang.Throwable throwable)Utility method to convert a stack trace to a StringvoidstatusMessage(java.lang.String message)Output a status message
-
-
-
Constructor Detail
-
LogManager
public LogManager(Step source)
Constructor that takes aStep. Uses the log from the step- Parameters:
source- the sourceStep
-
LogManager
public LogManager(Logger log)
Constructor that takes a log- Parameters:
log- the log to wrap
-
LogManager
public LogManager(Logger log, boolean status)
Constructor that takes a log- Parameters:
log- the log to wrapstatus- true if warning and error messages should be output to the status area as well as to the log
-
-
Method Detail
-
stackTraceToString
public static java.lang.String stackTraceToString(java.lang.Throwable throwable)
Utility method to convert a stack trace to a String- Parameters:
throwable- theThrowableto convert to a stack trace string- Returns:
- the string containing the stack trace
-
setLog
public void setLog(Logger log)
Set the log wrap- Specified by:
setLogin interfaceLogHandler- Parameters:
log- the log to wrap
-
getLog
public Logger getLog()
Get the wrapped log- Specified by:
getLogin interfaceLogHandler- Returns:
- the wrapped log
-
getLoggingLevel
public LoggingLevel getLoggingLevel()
Get the logging level in use- Returns:
-
setLoggingLevel
public void setLoggingLevel(LoggingLevel level)
Set the logging level to use- Parameters:
level- the level to use
-
logLow
public void logLow(java.lang.String message)
Log at the low level- Parameters:
message- the message to log
-
logBasic
public void logBasic(java.lang.String message)
Log at the basic level- Parameters:
message- the message to log
-
logDetailed
public void logDetailed(java.lang.String message)
Log at the detailed level- Parameters:
message- the message to log
-
logDebug
public void logDebug(java.lang.String message)
Log at the debugging level- Parameters:
message- the message to log
-
logWarning
public void logWarning(java.lang.String message)
Log a warning- Parameters:
message- the message to log
-
logError
public void logError(java.lang.String message, java.lang.Exception cause)Log an error- Parameters:
message- the message to logcause- the cause of the error
-
statusMessage
public void statusMessage(java.lang.String message)
Output a status message- Parameters:
message- the status message
-
log
public void log(java.lang.String message, LoggingLevel messageLevel)Log a message at the supplied level- Parameters:
message- the message to logmessageLevel- the level to log at
-
-