Package weka.knowledgeflow
Class LogManager
java.lang.Object
weka.knowledgeflow.LogManager
- All Implemented Interfaces:
LogHandler
Class that wraps a
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.- Version:
- $Revision: $
- Author:
- Mark Hall (mhall{[at]}pentaho{[dot]}com)
-
Constructor Summary
ConstructorsConstructorDescriptionLogManager(Logger log) Constructor that takes a logLogManager(Logger log, boolean status) Constructor that takes a logLogManager(Step source) Constructor that takes aStep. -
Method Summary
Modifier and TypeMethodDescriptiongetLog()Get the wrapped logGet the logging level in usevoidlog(String message, LoggingLevel messageLevel) Log a message at the supplied levelvoidLog at the basic levelvoidLog at the debugging levelvoidlogDetailed(String message) Log at the detailed levelvoidLog an errorvoidLog at the low levelvoidlogWarning(String message) Log a warningvoidSet the log wrapvoidsetLoggingLevel(LoggingLevel level) Set the logging level to usestatic StringstackTraceToString(Throwable throwable) Utility method to convert a stack trace to a StringvoidstatusMessage(String message) Output a status message
-
Constructor Details
-
LogManager
Constructor that takes aStep. Uses the log from the step- Parameters:
source- the sourceStep
-
LogManager
Constructor that takes a log- Parameters:
log- the log to wrap
-
LogManager
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 Details
-
stackTraceToString
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
Set the log wrap- Specified by:
setLogin interfaceLogHandler- Parameters:
log- the log to wrap
-
getLog
Get the wrapped log- Specified by:
getLogin interfaceLogHandler- Returns:
- the wrapped log
-
getLoggingLevel
Get the logging level in use- Returns:
-
setLoggingLevel
Set the logging level to use- Parameters:
level- the level to use
-
logLow
Log at the low level- Parameters:
message- the message to log
-
logBasic
Log at the basic level- Parameters:
message- the message to log
-
logDetailed
Log at the detailed level- Parameters:
message- the message to log
-
logDebug
Log at the debugging level- Parameters:
message- the message to log
-
logWarning
Log a warning- Parameters:
message- the message to log
-
logError
Log an error- Parameters:
message- the message to logcause- the cause of the error
-
statusMessage
Output a status message- Parameters:
message- the status message
-
log
Log a message at the supplied level- Parameters:
message- the message to logmessageLevel- the level to log at
-