hmi.util
Class LoggingHandler

java.lang.Object
  extended by java.util.logging.Handler
      extended by hmi.util.LoggingHandler

public class LoggingHandler
extends Handler

Logging Handler that redirects logging messages to the hmi.util.Console

Author:
Job Zwiers

Field Summary
private static Logger topLevelLogger
           
 
Constructor Summary
LoggingHandler()
          Create a new LoggingHandler in java.util.logging style
 
Method Summary
 void close()
          java.util.logging.Handler method, but has no effect for this Class
 void flush()
          java.util.logging.Handler method, but has no effect for this Class
 void publish(LogRecord rec)
          Prints the LogRecord message on the Console
 void reportError(String error, Exception ex, int code)
          Prints the error on the Console as well as to System.err
static void showLogging()
          showLogging(true)
static void showLogging(boolean exclusiveMode)
           
 
Methods inherited from class java.util.logging.Handler
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, setEncoding, setErrorManager, setFilter, setFormatter, setLevel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

topLevelLogger

private static Logger topLevelLogger
Constructor Detail

LoggingHandler

public LoggingHandler()
Create a new LoggingHandler in java.util.logging style

Method Detail

close

public void close()
java.util.logging.Handler method, but has no effect for this Class

Specified by:
close in class Handler

flush

public void flush()
java.util.logging.Handler method, but has no effect for this Class

Specified by:
flush in class Handler

publish

public void publish(LogRecord rec)
Prints the LogRecord message on the Console

Specified by:
publish in class Handler

reportError

public void reportError(String error,
                        Exception ex,
                        int code)
Prints the error on the Console as well as to System.err

Overrides:
reportError in class Handler

showLogging

public static void showLogging()
showLogging(true)


showLogging

public static void showLogging(boolean exclusiveMode)