|
|
@ -33,12 +33,15 @@ public class ThrowableLogAppender extends AbstractAppender { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void append(LogEvent logEvent) { |
|
|
|
public void append(LogEvent logEvent) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
if (logEvent.getLevel() == Level.ERROR) { |
|
|
|
if (logEvent.getLevel() == Level.ERROR) { |
|
|
|
Throwable thrown = logEvent.getThrown(); |
|
|
|
Throwable thrown = logEvent.getThrown(); |
|
|
|
if (thrown != null) { |
|
|
|
if (thrown != null) { |
|
|
|
ThrowableStore.getInstance().add(thrown); |
|
|
|
ThrowableStore.getInstance().add(thrown); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} catch (Throwable ignore) { |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private LogHandler<ThrowableLogAppender> toHandler() { |
|
|
|
private LogHandler<ThrowableLogAppender> toHandler() { |
|
|
|