Skip to content

Commit

Permalink
Merge pull request #11517 from pshipton/loglevel0.24
Browse files Browse the repository at this point in the history
(0.24.0) PlatformLoggingMXBean.setLoggerLevel() should allow null level
  • Loading branch information
tajila committed Dec 18, 2020
2 parents 37218de + 7b5e371 commit cba9b21
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -300,13 +300,19 @@ public void setLoggerLevel(String loggerName, String levelName) {
// a valid level name.
/*[IF Sidecar19-SE]*/
try {
Object newLevel = level_parse.invoke(null, levelName);
Object newLevel = null;
if (levelName != null) {
newLevel = level_parse.invoke(null, levelName);
}
logger_setLevel.invoke(logger, newLevel);
} catch (Exception e) {
throw handleError(e);
}
/*[ELSE]*/
Level newLevel = Level.parse(levelName);
Level newLevel = null;
if (levelName != null) {
newLevel = Level.parse(levelName);
}
logger.setLevel(newLevel);
/*[ENDIF]*/
} else {
Expand Down

0 comments on commit cba9b21

Please sign in to comment.