Class DefaultHandler


  • public class DefaultHandler
    extends Handler
    This is the default handler for logging. It is associated with the RootLogger by default.
    • Constructor Detail

      • DefaultHandler

        public DefaultHandler()
    • Method Detail

      • close

        public void close()
                   throws SecurityException
        Description copied from class: Handler
        Close the handler and the associated resources (such as streams, connections, files).

        NOTE: this method is not called by the framework.

        Specified by:
        close in class Handler
        Throws:
        SecurityException - if a security manager exits and if the caller does not have the appropriate permissions.
      • flush

        public void flush()
        Description copied from class: Handler
        Flush any buffered output.

        NOTE: this method is not called by the framework.

        Specified by:
        flush in class Handler
      • publish

        public void publish​(LogRecord record)
        Description copied from class: Handler
        Publish a LogRecord. The logging request was made initially to a logger, which forwarded the LogRecord to the handler if the logger's level was compatible.
        Specified by:
        publish in class Handler
        Parameters:
        record - the LogRecord to publish.