public class ThrowablePrinter extends Object
Generally used to flatten a stack trace into a single string removing \r\n and limiting the size of any given stack.
| Constructor and Description |
|---|
ThrowablePrinter() |
| Modifier and Type | Method and Description |
|---|---|
String |
print(Throwable e)
Convert the error into a string representation.
|
protected void |
printThrowable(StringBuffer sb,
Throwable e,
boolean isCause)
Recursively output the Throwable stack trace to the log.
|
void |
setMaxStackTraceLines(int maxStackTraceLines)
Set the maximum number of lines in any one part of
the stack trace.
|
void |
setNewLineChar(String newLineChar)
Set the new line character used to replace \r\n with.
|
public void setMaxStackTraceLines(int maxStackTraceLines)
public void setNewLineChar(String newLineChar)
public String print(Throwable e)
Replaces the \r\n and limits the stack lines.
protected void printThrowable(StringBuffer sb, Throwable e, boolean isCause)
sb - the buffer to write the stack trace toe - the source throwableisCause - flag to indicate if this is the top level throwable or a
causeCopyright © 2014. All Rights Reserved.