Class ConsoleFormatter


public class ConsoleFormatter extends Formatter
Specifically intended for short-term console output. It contains the bare minimum of information. Memory optimization is 'good enough' for console output. Features:
  • Hides the day, only the hour is shown
  • Hides severities, except for 'WARNING' and 'ERROR'
  • Hides the method name
  • Supports minimal colors
  • Constructor Details

    • ConsoleFormatter

      public ConsoleFormatter()
  • Method Details

    • setEnableAnsiColors

      public void setEnableAnsiColors(boolean enableAnsiColors)
    • format

      public String format(LogRecord r)
      Specified by:
      format in class Formatter