Commit dfe94a0a authored by Dileep Bapat's avatar Dileep Bapat Committed by Andy Wilkinson

Trim whitespace when coercing to a LogLevel

See gh-15143
parent d6571c01
...@@ -364,7 +364,7 @@ public class LoggingApplicationListener implements GenericApplicationListener { ...@@ -364,7 +364,7 @@ public class LoggingApplicationListener implements GenericApplicationListener {
private void setLogLevel(LoggingSystem system, String name, String level) { private void setLogLevel(LoggingSystem system, String name, String level) {
try { try {
name = name.equalsIgnoreCase(LoggingSystem.ROOT_LOGGER_NAME) ? null : name; name = name.equalsIgnoreCase(LoggingSystem.ROOT_LOGGER_NAME) ? null : name;
system.setLogLevel(name, coerceLogLevel(level)); system.setLogLevel(name, coerceLogLevel(level.trim()));
} }
catch (RuntimeException ex) { catch (RuntimeException ex) {
this.logger.error("Cannot set level: " + level + " for '" + name + "'"); this.logger.error("Cannot set level: " + level + " for '" + name + "'");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment