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
ConstructorDescriptionLogManager
(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 usevoid
log
(String message, LoggingLevel messageLevel) Log a message at the supplied levelvoid
Log at the basic levelvoid
Log at the debugging levelvoid
logDetailed
(String message) Log at the detailed levelvoid
Log an errorvoid
Log at the low levelvoid
logWarning
(String message) Log a warningvoid
Set the log wrapvoid
setLoggingLevel
(LoggingLevel level) Set the logging level to usestatic String
stackTraceToString
(Throwable throwable) Utility method to convert a stack trace to a Stringvoid
statusMessage
(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
- theThrowable
to convert to a stack trace string- Returns:
- the string containing the stack trace
-
setLog
Set the log wrap- Specified by:
setLog
in interfaceLogHandler
- Parameters:
log
- the log to wrap
-
getLog
Get the wrapped log- Specified by:
getLog
in 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
-