Module org.jcommon

Class LogHandler

    • Constructor Detail

      • LogHandler

        public LogHandler()
        Create a Log Handler for System.out.
      • LogHandler

        public LogHandler​(OutputStream output)
        Create a Log Handler that publish its records to the given output
        Parameters:
        output - the output stream where the records capted by this handler are published.
      • LogHandler

        public LogHandler​(OutputStream output,
                          Level level)
        Create a Log Handler that publish its records to the given output. The record level is given by parameter level
        Parameters:
        output - the output stream where the records capted by this handler are published.
        level - the level of the publihed records.
    • Method Detail

      • publish

        public void publish​(LogRecord record)
        Publish a log record.
        The logging request was made initially to a Logger object, which initialized the log record 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