Class ExceptionFormatter

  • Direct Known Subclasses:
    CauseFirstExceptionFormatter, MicrosoftTeamsExceptionFormatter

    public class ExceptionFormatter
    extends AbstractExceptionFormatter
    Presents the exception of a Log Event as a nicely formatted textual representation. Supports filtering stack traces by package and (for SlackExceptionFormatter) including a link to the corresponding source code.

    Example configuration

     observer.x.formatter.exceptionFormatter=CauseFirstExceptionFormatter
     observer.x.formatter.exceptionFormatter.packageFilter=sun.www, com.example.uninteresting
     observer.x.formatter.sourceCode.1.package=org.logevents
     observer.x.formatter.sourceCode.1.github=jhannes/logevents
     
    You can also specify package filters for all observers:
     observer.*.packageFilter=sun.www, com.example.uninteresting
     
    Author:
    Johannes Brodwall