[jboss-svn-commits] JBL Code SVN: r29049 - labs/jbosstm/trunk/common/classes/com/arjuna/common/internal/util/logging.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Aug 25 09:22:25 EDT 2009


Author: jhalliday
Date: 2009-08-25 09:22:25 -0400 (Tue, 25 Aug 2009)
New Revision: 29049

Modified:
   labs/jbosstm/trunk/common/classes/com/arjuna/common/internal/util/logging/LogNoi18nImpl.java
Log:
Add additional threshold check to is debugAllowed. JBTM-612


Modified: labs/jbosstm/trunk/common/classes/com/arjuna/common/internal/util/logging/LogNoi18nImpl.java
===================================================================
--- labs/jbosstm/trunk/common/classes/com/arjuna/common/internal/util/logging/LogNoi18nImpl.java	2009-08-25 13:12:16 UTC (rev 29048)
+++ labs/jbosstm/trunk/common/classes/com/arjuna/common/internal/util/logging/LogNoi18nImpl.java	2009-08-25 13:22:25 UTC (rev 29049)
@@ -338,9 +338,10 @@
     */
    public boolean debugAllowed(long dLevel, long vLevel, long fLevel)
    {
-      return (((dLevel & m_debugLevel) != 0) &&
-            ((vLevel & m_visLevel) != 0) &&
-            ((fLevel & m_facLevel) != 0));
+       // check the underlying logger threshold as well as (but after, due to cost)
+       // our own filters, as many use points call debugAllowed rather than isDebugEnabled.
+       return (((dLevel & m_debugLevel) != 0) && ((vLevel & m_visLevel) != 0) &&
+              ((fLevel & m_facLevel) != 0) && isDebugEnabled());
    }
 
    /**********************************************************************************************************



More information about the jboss-svn-commits mailing list