Class JsonExceptionFormatter


  • public class JsonExceptionFormatter
    extends AbstractExceptionFormatter
    Presents the exception of a Log Event as a JSON representation. Supports filtering stack traces by package and including a link to the corresponding source code.

    Example configuration

     observer.x.formatter.exceptionFormatter=JsonExceptionFormatter
     observer.x.formatter.exceptionFormatter.packageFilter=sun.www, com.example.uninteresting
     observer.x.formatter.exceptionFormatter.sourceCode.1.package=org.logevents
     observer.x.formatter.exceptionFormatter.sourceCode.1.maven=org.logevents/logevents
     
    You can also specify package filters and source code for all observers:
     observer.*.packageFilter=sun.www, com.example.uninteresting
     observer.*.sourceCode.1.package=org.logevents
     observer.*.sourceCode.1.github=jhannes/logevents
     
    For more on source code links, see AbstractExceptionFormatter.configureSourceCode(Configuration)
    Author:
    Johannes Brodwall