private void createStackTraceEvent(final LogEvent loggingEvent) { if (loggingEvent.getThrown().getStackTrace() != null) { final String[] options = { "full" }; final ThrowablePatternConverter converter = ThrowablePatternConverter.newInstance(options); final StringBuilder sb = new StringBuilder(); converter.format(loggingEvent, sb); final String stackTrace = sb.toString(); addEventData(LayoutFields.STACK_TRACE, stackTrace); } }