private void handleThrown(ILoggingEvent loggingEvent) { if (loggingEvent.getThrowableProxy() != null) { if (loggingEvent.getThrowableProxy().getClassName() != null) { addEventData(LayoutFields.EXCEPTION_CLASS, loggingEvent.getThrowableProxy().getClassName()); } if (loggingEvent.getThrowableProxy().getMessage() != null) { addEventData(LayoutFields.EXCEPTION_MESSAGE, loggingEvent.getThrowableProxy().getMessage()); } ThrowableProxyConverter converter = new RootCauseFirstThrowableProxyConverter(); converter.setOptionList(Arrays.asList("full")); converter.start(); String stackTrace = converter.convert(loggingEvent); addEventData(LayoutFields.STACK_TRACE, stackTrace); } }