Class SwingDocumentLogHandler


  • public class SwingDocumentLogHandler
    extends java.util.logging.Handler
    A java.util.logging Handler that appends to a javax.swing.text.Document.
    Author:
    Barrie Treloar, Peter Becker
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private javax.swing.text.Document document  
      private static java.util.logging.Logger LOGGER  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      void flush()  
      javax.swing.text.Document getDocument()  
      void publish​(java.util.logging.LogRecord record)  
      • Methods inherited from class java.util.logging.Handler

        getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, 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

      • LOGGER

        private static final java.util.logging.Logger LOGGER
      • document

        private javax.swing.text.Document document
    • Constructor Detail

      • SwingDocumentLogHandler

        public SwingDocumentLogHandler()
    • Method Detail

      • getDocument

        public javax.swing.text.Document getDocument()
      • publish

        public void publish​(java.util.logging.LogRecord record)
        Specified by:
        publish in class java.util.logging.Handler
      • flush

        public void flush()
        Specified by:
        flush in class java.util.logging.Handler
      • close

        public void close()
                   throws java.lang.SecurityException
        Specified by:
        close in class java.util.logging.Handler
        Throws:
        java.lang.SecurityException