Skip to content

Commit

Permalink
0004640: Fixed issue that caused stack traces to not appear in Monito…
Browse files Browse the repository at this point in the history
…rSummaryDialog (#121)
  • Loading branch information
evan-miller-jumpmind committed Nov 18, 2020
1 parent 229e2ed commit c34d48f
Showing 1 changed file with 9 additions and 1 deletion.
Expand Up @@ -22,6 +22,8 @@

import static org.apache.commons.lang3.StringUtils.isNotBlank;

import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
Expand Down Expand Up @@ -86,7 +88,13 @@ public void append(LogEvent event) {
summary.setLevel(event.getLevel());
summary.setMostRecentTime(event.getInstant().getEpochMillisecond());
summary.setCount(summary.getCount() + 1);
summary.setThrowable(event.getThrown());
Throwable throwable = event.getThrown();
summary.setThrowable(throwable);
if (throwable != null) {
StringWriter st = new StringWriter();
throwable.printStackTrace(new PrintWriter(st));
summary.setStackTrace(st.toString());
}
summary.setMostRecentThreadName(event.getThreadName());
}
}
Expand Down

0 comments on commit c34d48f

Please sign in to comment.