Package uk.ac.starlink.topcat

## Class LogHandler

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

-     public class LogHandler
      extends java.util.logging.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

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static LogHandler` | `getInstance()` | Returns the sole instance of this class.
    `void` | `showWindow​(java.awt.Component parent)` | Displays a logging window which displays recent (the last 1000) and any future log messages.

    - ### Methods inherited from class java.util.logging.Handler

      `getEncoding, getErrorManager, getFilter, getFormatter, getLevel, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel`

    - ### Methods inherited from class java.util.logging.MemoryHandler

      `close, flush, getPushLevel, isLoggable, publish, push, setPushLevel`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### showWindow

          public void showWindow​(java.awt.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.