Polish "Logback StructuredLogFormatter exceptions are not visible to the user"
See gh-43575
This commit is contained in:
parent
c256f41fce
commit
33849f82b4
|
@ -27,7 +27,7 @@ import ch.qos.logback.core.status.StatusListener;
|
||||||
*
|
*
|
||||||
* @author Dmytro Nosan
|
* @author Dmytro Nosan
|
||||||
*/
|
*/
|
||||||
final class FilteringStatusListener extends ContextAwareBase implements StatusListener, LifeCycle {
|
class FilteringStatusListener extends ContextAwareBase implements StatusListener, LifeCycle {
|
||||||
|
|
||||||
private final StatusListener delegate;
|
private final StatusListener delegate;
|
||||||
|
|
||||||
|
|
|
@ -495,9 +495,11 @@ public class LogbackLoggingSystem extends AbstractLoggingSystem implements BeanF
|
||||||
FilteringStatusListener listener = new FilteringStatusListener(new OnErrorConsoleStatusListener(),
|
FilteringStatusListener listener = new FilteringStatusListener(new OnErrorConsoleStatusListener(),
|
||||||
Status.ERROR);
|
Status.ERROR);
|
||||||
listener.setContext(context);
|
listener.setContext(context);
|
||||||
context.getStatusManager().add(listener);
|
boolean effectivelyAdded = context.getStatusManager().add(listener);
|
||||||
|
if (effectivelyAdded) {
|
||||||
listener.start();
|
listener.start();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void setStatusPrinterStream(PrintStream stream) {
|
void setStatusPrinterStream(PrintStream stream) {
|
||||||
this.statusPrinter.setPrintStream(stream);
|
this.statusPrinter.setPrintStream(stream);
|
||||||
|
|
Loading…
Reference in New Issue