uk.ac.starlink.topcat
Class LogHandler

java.lang.Object
  extended by java.util.logging.Handler
      extended by java.util.logging.MemoryHandler
          extended by uk.ac.starlink.topcat.LogHandler

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.

Since:
17 Jun 2005
Author:
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

showWindow

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

Parameters:
parent - parent component, may be used for positioning

getInstance

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.

Returns:
singleton handler


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