Class ConsoleLogEventFormatter

  • All Implemented Interfaces:
    Function<LogEvent,​String>, LogEventFormatter

    public class ConsoleLogEventFormatter
    extends Object
    implements LogEventFormatter
    A simple formatter used by ConsoleLogEventObserver by default. Suitable for overriding apply(LogEvent) This is equivalent to
     observer...formatter=PatternLogEventFormatter
     observer...formatter.pattern=%time [%thread] [%coloredLevel] [%bold(%location)]%mdc: %message
     

    Example configuration

     observer.*.packageFilter=sun.www, com.example.uninteresting
     observer.console.includedMdcKeys=clientIp
     observer.console.showMarkers=true
     observer.console.multipleLines=false
     observer.console.color=true
     observer.console.logFilenameForPackages=com.example.myapp
     
    Author:
    Johannes Brodwall