@Test public void testNoException() { ExceptionMessageConverter converter = new ExceptionMessageConverter(); LoggerContext context = new LoggerContext(); converter.setContext(context); converter.start(); LoggingEvent infoEvent = new LoggingEvent("fcqn", context.getLogger("fcqn"), Level.INFO, "info", null, null); String actual = converter.convert(infoEvent); assertThat(actual).contains(""); }
@Override public String convert(ILoggingEvent event) { Integer whitespace = getLeadingWhitespace(); if (whitespace < 0) { addWarn("Cannot render whitespace less than 0!"); whitespace = 0; } Integer depth = getDepth(); if (depth < 1) { addWarn("Cannot render depth less than 1!"); depth = 1; } String prefix = getPrefix(); String sep = getSeparator(); String suffix = getSuffix(); IThrowableProxy ex = event.getThrowableProxy(); if (ex == null) { return ""; } return processException(ex, whitespace, depth, prefix, sep, suffix); }
ExceptionMessageConverter extends ThrowableHandlingConverter { @Override public String convert(ILoggingEvent event) { Integer whitespace = getLeadingWhitespace(); if (whitespace < 0) { addWarn("Cannot render whitespace less than 0!"); whitespace = 0; } Integer depth = getDepth(); if (depth < 1) { addWarn("Cannot render depth less than 1!"); depth = 1; } String prefix = getPrefix(); String sep = getSeparator(); String suffix = getSuffix(); IThrowableProxy ex = event.getThrowableProxy(); if (ex == null) { return ""; } return processException(ex, whitespace, depth, prefix, sep, suffix); } }
ExceptionMessageConverter extends ThrowableHandlingConverter { @Override public String convert(ILoggingEvent event) { Integer whitespace = getLeadingWhitespace(); if (whitespace < 0) { addWarn("Cannot render whitespace less than 0!"); whitespace = 0; } Integer depth = getDepth(); if (depth < 1) { addWarn("Cannot render depth less than 1!"); depth = 1; } String prefix = getPrefix(); String sep = getSeparator(); String suffix = getSuffix(); IThrowableProxy ex = event.getThrowableProxy(); if (ex == null) { return ""; } return processException(ex, whitespace, depth, prefix, sep, suffix); }  }
ExceptionMessageConverter extends ThrowableHandlingConverter { @Override public String convert(ILoggingEvent event) { Integer whitespace = getLeadingWhitespace(); if (whitespace < 0) { addWarn("Cannot render whitespace less than 0!"); whitespace = 0; } Integer depth = getDepth(); if (depth < 1) { addWarn("Cannot render depth less than 1!"); depth = 1; } String prefix = getPrefix(); String sep = getSeparator(); String suffix = getSuffix(); IThrowableProxy ex = event.getThrowableProxy(); if (ex == null) { return ""; } return processException(ex, whitespace, depth, prefix, sep, suffix); }  @Override String convert(ILoggingEvent event); }
ExceptionMessageConverter extends ThrowableHandlingConverter { @Override public String convert(ILoggingEvent event) { Integer whitespace = getLeadingWhitespace(); if (whitespace < 0) { addWarn("Cannot render whitespace less than 0!"); whitespace = 0; } Integer depth = getDepth(); if (depth < 1) { addWarn("Cannot render depth less than 1!"); depth = 1; } String prefix = getPrefix(); String sep = getSeparator(); String suffix = getSuffix(); IThrowableProxy ex = event.getThrowableProxy(); if (ex == null) { return ""; } return processException(ex, whitespace, depth, prefix, sep, suffix); }  @Override String convert(ILoggingEvent event);  }