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
This commit is contained in:
parent
6dcaec2fef
commit
bebcd60b7c
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue