[
https://jira.jboss.org/jira/browse/JBLOGGING-20?page=com.atlassian.jira.p...
]
Ondrej Medek commented on JBLOGGING-20:
---------------------------------------
Well, I do not know exactly, where is the problem, but I think I have found two bugs.
The LOG is org.jboss.logmanager.LoggerInstance and this class is subclass of
java.util.logging.Logger. The LoggerInstance class overrides the isLoggable(Level) method
from the Logger class. This overridden method LoggerInstance.isLoggable(Level) uses a new
value called effectiveLevel, which is:
effectiveLevel = 800, i.e. default value I guess, when I have configured to log ALL stuff
for my category in log4j config file. It should be INT.MIN_VALUE (= Level.ALL.intValue())
instead.
effectiveLevel = 400, when I have configured to log TRACE stuff for my category in log4j
config file. I.e. is is the same value, as Level.FINE.
Bug 1) Setting ALL level for the category in config file should set the effectiveLevel to
Level.ALL.intValue().
Bug 2) Setting TRACE level for the category in config file makes the
LOG.isLoggable(FINEST) always false, but LOG.finest("...") does make a log.
IMHO this "LoggerInstance.effectiveLevel" stuff is half baken: it is used only
in isLoggable(), but is not used in the log() methods (doLog, fine, finer, finest, ...).
Maybe it should be removed and the original Logger.levelValue should be used instead?
Then LoggerInstance would not need to override isLoggable().
JDK loggign isLoggable(Level.FINEST) returns false with Log4J
backend
---------------------------------------------------------------------
Key: JBLOGGING-20
URL:
https://jira.jboss.org/jira/browse/JBLOGGING-20
Project: JBoss Logging
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: jboss-logbridge
Environment: JBoss 5.1.0, JDK 1.6u13
Reporter: Ondrej Medek
Assignee: David Lloyd
I have code using JDK logging like:
if (LOG.isLoggable(Level.FINEST)) {
LOG.finest("added into list: " + something);
}
I have no log. When I use just
LOG.finest("added into list: " + something);
I got a log in the log file.
I use JBoss with Log4J. It is configured to log ALL stuff.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira