tom.platform
Class StatusHandler
java.lang.Object
java.util.logging.Handler
tom.platform.StatusHandler
public class StatusHandler
- extends Handler
Methods inherited from class java.util.logging.Handler |
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel |
StatusHandler
public StatusHandler()
- Constructor
clear
public void clear()
- Clear all previous records
publish
public void publish(LogRecord record)
- Specified by:
publish
in class Handler
close
public void close()
- Specified by:
close
in class Handler
flush
public void flush()
- Specified by:
flush
in class Handler
toString
public String toString()
- Overrides:
toString
in class Object
hasLog
public boolean hasLog(Level level)
hasError
public boolean hasError()
hasWarning
public boolean hasWarning()
nbOfLogs
public int nbOfLogs(Level level)
nbOfErrors
public int nbOfErrors()
nbOfWarnings
public int nbOfWarnings()
getAlertForInput
public RuntimeAlert getAlertForInput(String filePath)
getAlertMap
public Map<String,RuntimeAlert> getAlertMap()
isLoggable
public boolean isLoggable(LogRecord record)
- This Handler keeps track of all LogRecords, therefore this method always
returns true. Please note that since we receive the LogRecords from a
Logger, we actually only keep track of logs with a Level equal or higher
than the Logger's.
- Overrides:
isLoggable
in class Handler
- Parameters:
record
- a given LogRecord
- Returns:
- true