use of ch.qos.logback.classic.pattern.ExtendedThrowableProxyConverter in project sonarqube by SonarSource.
the class LogCallbackAppender method append.
@Override
protected void append(ILoggingEvent event) {
if (event.getThrowableProxy() == null) {
target.log(event.getFormattedMessage(), translate(event.getLevel()));
} else {
ExtendedThrowableProxyConverter throwableConverter = new ExtendedThrowableProxyConverter();
throwableConverter.start();
target.log(event.getFormattedMessage() + "\n" + throwableConverter.convert(event), translate(event.getLevel()));
throwableConverter.stop();
}
}
use of ch.qos.logback.classic.pattern.ExtendedThrowableProxyConverter in project sonarlint-core by SonarSource.
the class LogCallbackAppender method append.
@Override
protected void append(ILoggingEvent event) {
LogOutput target = tlTtarget.get();
if (target == null) {
defaultAppender.doAppend(event);
return;
}
String msg;
if (event.getThrowableProxy() == null) {
msg = event.getFormattedMessage();
} else {
ExtendedThrowableProxyConverter throwableConverter = new ExtendedThrowableProxyConverter();
throwableConverter.start();
msg = event.getFormattedMessage() + "\n" + throwableConverter.convert(event);
throwableConverter.stop();
}
handleErrors(event);
target.log(msg, translate(event.getLevel()));
}
Aggregations