[
https://issues.jboss.org/browse/WFLY-3038?page=com.atlassian.jira.plugin....
]
David Lloyd updated WFLY-3038:
------------------------------
Assignee: James Perkins (was: David Lloyd)
BridgeLogger implementation of Logger does not support Level.OFF or
null as parameter values for setLevel method
----------------------------------------------------------------------------------------------------------------
Key: WFLY-3038
URL:
https://issues.jboss.org/browse/WFLY-3038
Project: WildFly
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Logging
Reporter: Antonio Montanana
Assignee: James Perkins
Labels: jboss
Deploying our application on the JBoss 6.0.0 application server we encounter the
following NullPointerException (NPE) also logged in the
log\server.log file:
2011-03-17 12:52:18,269 ERROR
[filenet_error.engine.com.filenet.engine.tasks.TaskManager]
(TaskManager$RootTask_RootTask_ScheduledPoolExecutor_9)
TaskManager$RootTask:RootTask running with error , with message null:
java.lang.NullPointerException
at org.jboss.logmanager.log4j.LevelMapping.getLevelFor(LevelMapping.java:65)
[:6.0.0.Final]
at org.jboss.logmanager.log4j.BridgeLogger.setPriority(BridgeLogger.java:199)
[:6.0.0.Final]
at org.jboss.logmanager.log4j.BridgeLogger.setLevel(BridgeLogger.java:194)
[:6.0.0.Final]
at com.filenet.engine.util.Logger.removeTraceLoggerLevel(Logger.java:377)
...
The com.filenet.engine.util.Logger.removeTraceLoggerLevel method executes the following
two lines of code:
org.apache.log4j.Logger traceLogger = getLog4JTraceLogger(subsystem, traceFlag);
traceLogger.setLevel(null);
Note the setLevel method is passing in a null parameter value (supported by
org.apache.log4j.Logger.setLevel) to remove the specified logging level. We've
verified that the JBoss LevelMapping.getLevelFor method throws the NPE as a result of the
null parameter value passed into setLevel (changing the parameter value to another level
(e.g. Level.DEBUG) eliminates the exception). The setLevel(null) code executed with no
exceptions in JBoss 5.1.0 and earlier versions of the server and is supported by
org.apache.log4j.Logger.setLevel.
It appears that the logging mechanism has changed significantly in JBoss 6.0, there is
now a BridgeLogger class that extends the
org.apache.log4j.Logger class providing the implementation of the setLevel method. That
implementation appears to have omitted
support for "null" as a parameter value and causes the NPE. Further testing
indicates that the Level.OFF value is also not supported either - leaving no way to remove
the logging level.
We would like to see support for "null" and Level.OFF added to the BridgeLogger
extension of Logger.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira