Is the java.util.logging CONFIG level correctly mapped to the Log4J DEBUG level?
Issue
An issue with debug level log messages being output unexpectedly was reported by an application. We used this source code to step through the debugger. The following code that maps between JUL and Log4j seems to have a buggy line:
map.put(java.util.logging.Level.SEVERE, Level.ERROR);
map.put(java.util.logging.Level.WARNING, Level.WARN);
map.put(java.util.logging.Level.CONFIG, Level.DEBUG);
map.put(java.util.logging.Level.INFO, Level.INFO);
map.put(java.util.logging.Level.FINE, Level.DEBUG);
map.put(java.util.logging.Level.FINER, Level.DEBUG);
map.put(java.util.logging.Level.FINEST, Level.TRACE);
java.util.logging
CONFIG
messages are mapped to DEBUG
level.
map.put(java.util.logging.Level.CONFIG, Level.DEBUG);
This does not seem correct. We expected config messages to map to INFO
level. Actually, we expected the CONFIG level not be mapped to anything since EAP has its own internal representation of the CONFIG level and log records would be output at this unique level: definition; the EAP documentation states this about log levels:
FINEST 300
FINER 400
TRACE 400
DEBUG 500
FINE 500
CONFIG 700
INFO 800
WARN 900
WARNING 900
ERROR 1000
SEVERE 1000
FATAL 1100
Is the mapping from CONFIG to DEBUG intentional?
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.