Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.5
-
None
-
None
Description
1. The loggers run into a NullPointer if someone use an incorrect logger name. After this nullpointer, the Mbean display “Unavailable” for this logger, so the whole config file must be reloaded. Here the log output of my local testing. I would expect that the logger do not except the incorrect value and internally remain with the previous value (maybe throw a IllegalArgumentException to give a feedback to the user).
validating [row=4, column=1]: Level=asdfasdf setAttribute(Level=asdfasdf) java.lang.NullPointerException at org.apache.logging.log4j.core.config.LoggerConfig.getLevel(LoggerConfig.java:261) at org.apache.logging.log4j.core.Logger$PrivateConfig.<init>(Logger.java:312) at org.apache.logging.log4j.core.Logger.updateConfiguration(Logger.java:293) at org.apache.logging.log4j.core.LoggerContext.updateLoggers(LoggerContext.java:595) at org.apache.logging.log4j.core.LoggerContext.updateLoggers(LoggerContext.java:585) at org.apache.logging.log4j.core.jmx.LoggerConfigAdmin.setLevel(LoggerConfigAdmin.java:82)