Class LogHandler

  extended by java.util.logging.Handler
      extended by java.util.logging.MemoryHandler
          extended by

public class LogHandler
extends MemoryHandler

Log handler which can provide a window displaying recent log events. Once the window has been displayed, maintaining it may become expensive as the list of events grows, but if it's never displayed no great expense should be incurred (just maintenance of a MemoryHandler).

Since logging is necessarily a system-wide matter, this is a singleton class.

17 Jun 2005
Mark Taylor (Starlink)

Method Summary
static LogHandler getInstance()
          Returns the sole instance of this class.
 void showWindow(Component parent)
          Displays a logging window which displays recent (the last 1000) and any future log messages.
Methods inherited from class java.util.logging.MemoryHandler
close, flush, getPushLevel, isLoggable, publish, push, setPushLevel
Methods inherited from class java.util.logging.Handler
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail


public void showWindow(Component parent)
Displays a logging window which displays recent (the last 1000) and any future log messages.

parent - parent component, may be used for positioning


public static LogHandler getInstance()
Returns the sole instance of this class. A null result may be returned if the Security Manager will not permit logging configuration to be performed.

singleton handler

Copyright © 2003-2019 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.