Class MyConsoleHandler


public class MyConsoleHandler extends StreamHandler
  • Constructor Details

    • MyConsoleHandler

      public MyConsoleHandler(OutputStream out)
      Create a ConsoleHandler for System.err.

      The ConsoleHandler is configured based on LogManager properties (or their default values).

  • Method Details

    • publish

      public void publish(LogRecord record)
      Publish a LogRecord.

      The logging request was made initially to a Logger object, which initialized the LogRecord and forwarded it here.

      Overrides:
      publish in class StreamHandler
      Parameters:
      record - description of the log event. A null record is silently ignored and is not published
    • close

      public void close()
      Override StreamHandler.close to do a flush but not to close the output stream. That is, we do not close System.err.
      Overrides:
      close in class StreamHandler