Skip to content

Commit dfe94a0

Browse files
dileepbapatwilkinsona
authored andcommitted
Trim whitespace when coercing to a LogLevel
See gh-15143
1 parent d6571c0 commit dfe94a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/logging/LoggingApplicationListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ private void setLogLevel(LoggingSystem system, String[] names, String level) {
364364
private void setLogLevel(LoggingSystem system, String name, String level) {
365365
try {
366366
name = name.equalsIgnoreCase(LoggingSystem.ROOT_LOGGER_NAME) ? null : name;
367-
system.setLogLevel(name, coerceLogLevel(level));
367+
system.setLogLevel(name, coerceLogLevel(level.trim()));
368368
}
369369
catch (RuntimeException ex) {
370370
this.logger.error("Cannot set level: " + level + " for '" + name + "'");

0 commit comments

Comments
 (0)