- All Superinterfaces:
LogFormatter
- All Known Implementing Classes:
LogFormatter.NoopFormatter
- Enclosing interface:
LogFormatter
Formats a throwable.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jstach.rainbowgum.LogFormatter
LogFormatter.Builder, LogFormatter.EventFormatter, LogFormatter.LevelFormatter, LogFormatter.NoopFormatter, LogFormatter.StaticFormatter, LogFormatter.ThrowableFormatter, LogFormatter.TimestampFormatter -
Method Summary
Modifier and TypeMethodDescriptionstatic voidConvenience to append a throwable to string builder.default voidformat(StringBuilder output, LogEvent event) Formats a log event.voidformatThrowable(StringBuilder output, Throwable throwable) Formats a throwable and appends.of()Default implementation usesThrowable.printStackTrace(PrintWriter).Methods inherited from interface io.jstach.rainbowgum.LogFormatter
isNoop
-
Method Details
-
formatThrowable
Formats a throwable and appends.- Parameters:
output- buffer.throwable- throwable.
-
format
Description copied from interface:LogFormatterFormats a log event.- Specified by:
formatin interfaceLogFormatter- Parameters:
output- buffer.event- log event.- See Also:
-
of
Default implementation usesThrowable.printStackTrace(PrintWriter).- Returns:
- formatter.
-
appendThrowable
Convenience to append a throwable to string builder.- Parameters:
b- buffer.t- throwable.- API Note
- this call creates garbage.
-