diff --git a/spring-boot/src/main/java/org/springframework/boot/logging/logback/LogbackLoggingSystem.java b/spring-boot/src/main/java/org/springframework/boot/logging/logback/LogbackLoggingSystem.java index 5d402b261e6..26f555f2235 100644 --- a/spring-boot/src/main/java/org/springframework/boot/logging/logback/LogbackLoggingSystem.java +++ b/spring-boot/src/main/java/org/springframework/boot/logging/logback/LogbackLoggingSystem.java @@ -77,7 +77,11 @@ public class LogbackLoggingSystem extends AbstractLoggingSystem { Assert.notNull(configLocation, "ConfigLocation must not be null"); String resolvedLocation = SystemPropertyUtils.resolvePlaceholders(configLocation); ILoggerFactory factory = StaticLoggerBinder.getSingleton().getLoggerFactory(); - Assert.isInstanceOf(ILoggerFactory.class, factory); + Assert.isInstanceOf( + LoggerContext.class, + factory, + "LoggerFactory is not a Logback LoggerContext but Logback is on the classpath. Either remove Logback or the competing implementation (" + + factory.getClass() + ")"); LoggerContext context = (LoggerContext) factory; context.stop(); try {