Home / Type/ StackTracePrinter Type — spring-boot Architecture

StackTracePrinter Type — spring-boot Architecture

Architecture documentation for the StackTracePrinter type/interface in StackTracePrinter.java from the spring-boot codebase.

Entity Profile

Source Code

core/spring-boot/src/main/java/org/springframework/boot/logging/StackTracePrinter.java lines 29–57

@FunctionalInterface
public interface StackTracePrinter {

	/**
	 * Return a {@link String} containing the printed stack trace for a given
	 * {@link Throwable}.
	 * @param throwable the throwable that should have its stack trace printed
	 * @return the stack trace string
	 */
	default String printStackTraceToString(Throwable throwable) {
		try {
			StringBuilder out = new StringBuilder(4096);
			printStackTrace(throwable, out);
			return out.toString();
		}
		catch (IOException ex) {
			throw new UncheckedIOException(ex);
		}
	}

	/**
	 * Prints a stack trace for the given {@link Throwable}.
	 * @param throwable the throwable that should have its stack trace printed
	 * @param out the destination to write output
	 * @throws IOException on IO error
	 */
	void printStackTrace(Throwable throwable, Appendable out) throws IOException;

}

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free