Commit bebcd60b authored by Phillip Webb's avatar Phillip Webb

Call LoggerContext.reset() during logback init

Update `LogbackLoggingSystem` to call the `reset()` method on the
`LoggerContext` before initialization.

This will hopefully reset the context to prevent the same appenders
from being accidentally added more than once.

Fixes gh-1091
parent 6dcaec2f
......@@ -96,6 +96,7 @@ public class LogbackLoggingSystem extends AbstractLoggingSystem {
+ "or the competing implementation (" + factory.getClass() + ")");
LoggerContext context = (LoggerContext) factory;
context.stop();
context.reset();
try {
URL url = ResourceUtils.getURL(resolvedLocation);
new ContextInitializer(context).configureByResource(url);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment