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
|
||||
*/
|
||||
final class FilteringStatusListener extends ContextAwareBase implements StatusListener, LifeCycle {
|
||||
class FilteringStatusListener extends ContextAwareBase implements StatusListener, LifeCycle {
|
||||
|
||||
private final StatusListener delegate;
|
||||
|
||||
|
|
|
@ -495,8 +495,10 @@ public class LogbackLoggingSystem extends AbstractLoggingSystem implements BeanF
|
|||
FilteringStatusListener listener = new FilteringStatusListener(new OnErrorConsoleStatusListener(),
|
||||
Status.ERROR);
|
||||
listener.setContext(context);
|
||||
context.getStatusManager().add(listener);
|
||||
listener.start();
|
||||
boolean effectivelyAdded = context.getStatusManager().add(listener);
|
||||
if (effectivelyAdded) {
|
||||
listener.start();
|
||||
}
|
||||
}
|
||||
|
||||
void setStatusPrinterStream(PrintStream stream) {
|
||||
|
|
Loading…
Reference in New Issue