diff --git a/logback-classic/src/main/java/ch/qos/logback/classic/LoggerContext.java b/logback-classic/src/main/java/ch/qos/logback/classic/LoggerContext.java index 8875099889..8177756892 100755 --- a/logback-classic/src/main/java/ch/qos/logback/classic/LoggerContext.java +++ b/logback-classic/src/main/java/ch/qos/logback/classic/LoggerContext.java @@ -411,11 +411,10 @@ public MDCAdapter getMDCAdapter() { } public void setMDCAdapter(MDCAdapter anAdapter) { - if(this.mdcAdapter == null) { - this.mdcAdapter = anAdapter; - } else { + if(this.mdcAdapter != null) { StatusManager sm = getStatusManager(); - sm.add(new ErrorStatus("mdcAdapter cannot be set multiple times", this, new IllegalStateException("mdcAdapter already set"))); + sm.add(new WarnStatus("mdcAdapter being reset a second time", this)); } + this.mdcAdapter = anAdapter; } }