diff --git a/spring-boot/src/main/java/org/springframework/boot/logging/LoggingApplicationListener.java b/spring-boot/src/main/java/org/springframework/boot/logging/LoggingApplicationListener.java index 6c7bfa44646..4d6873b844b 100644 --- a/spring-boot/src/main/java/org/springframework/boot/logging/LoggingApplicationListener.java +++ b/spring-boot/src/main/java/org/springframework/boot/logging/LoggingApplicationListener.java @@ -246,7 +246,12 @@ public class LoggingApplicationListener implements SmartApplicationListener { name = null; } level = environment.resolvePlaceholders(level); - system.setLogLevel(name, LogLevel.valueOf(level.toUpperCase())); + if (Boolean.toString(false).equalsIgnoreCase(level)) { + system.setLogLevel(name, LogLevel.OFF); + } + else { + system.setLogLevel(name, LogLevel.valueOf(level.toUpperCase())); + } } catch (RuntimeException ex) { this.logger.error("Cannot set level: " + level + " for '" + name + "'");