forked from j62/ctbrec
Print out the whole stack trace included cause chain
This commit is contained in:
parent
8cfeb853a7
commit
1a1a904ee2
|
@ -171,12 +171,16 @@ public class LoggingTab extends Tab {
|
|||
|
||||
private String createLogMessage(LoggingEvent evt) {
|
||||
StringBuilder sb = new StringBuilder(evt.getFormattedMessage());
|
||||
if(evt.getThrowableProxy() != null) {
|
||||
IThrowableProxy throwableProxy = evt.getThrowableProxy();
|
||||
IThrowableProxy throwableProxy = evt.getThrowableProxy();
|
||||
while (throwableProxy != null) {
|
||||
sb.append('\n').append(throwableProxy.getClassName()).append(':').append(' ').append(throwableProxy.getMessage());
|
||||
for (StackTraceElementProxy step : throwableProxy.getStackTraceElementProxyArray()) {
|
||||
sb.append('\n').append('\t').append(step.getSTEAsString());
|
||||
}
|
||||
throwableProxy = throwableProxy.getCause();
|
||||
if (throwableProxy != null) {
|
||||
sb.append("\nCaused by: ");
|
||||
}
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue