From dfe94a0abb19c8577a6fde2042f44d8ecd84fd4e Mon Sep 17 00:00:00 2001 From: Dileep Bapat Date: Fri, 9 Nov 2018 16:40:42 +0530 Subject: [PATCH] Trim whitespace when coercing to a LogLevel See gh-15143 --- .../boot/context/logging/LoggingApplicationListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/logging/LoggingApplicationListener.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/logging/LoggingApplicationListener.java index de4bc29b0f..781297c12f 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/logging/LoggingApplicationListener.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/logging/LoggingApplicationListener.java @@ -364,7 +364,7 @@ public class LoggingApplicationListener implements GenericApplicationListener { private void setLogLevel(LoggingSystem system, String name, String level) { try { name = name.equalsIgnoreCase(LoggingSystem.ROOT_LOGGER_NAME) ? null : name; - system.setLogLevel(name, coerceLogLevel(level)); + system.setLogLevel(name, coerceLogLevel(level.trim())); } catch (RuntimeException ex) { this.logger.error("Cannot set level: " + level + " for '" + name + "'");