openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c..@apache.org
Subject svn commit: r573653 - /openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/log/Log4JLogFactory.java
Date Fri, 07 Sep 2007 18:10:43 GMT
Author: clr
Date: Fri Sep  7 11:10:43 2007
New Revision: 573653

URL: http://svn.apache.org/viewvc?rev=573653&view=rev
Log:
OPENJPA-355 Fix checking for log levels; patch submitted by Adrian Co"


Modified:
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/log/Log4JLogFactory.java

Modified: openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/log/Log4JLogFactory.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/log/Log4JLogFactory.java?rev=573653&r1=573652&r2=573653&view=diff
==============================================================================
--- openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/log/Log4JLogFactory.java
(original)
+++ openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/log/Log4JLogFactory.java
Fri Sep  7 11:10:43 2007
@@ -49,23 +49,23 @@
         }
 
         public boolean isTraceEnabled() {
-            return _log.getEffectiveLevel().toInt() >= Level.DEBUG_INT;
+            return _log.isEnabledFor(Level.DEBUG);
         }
 
         public boolean isInfoEnabled() {
-            return _log.getEffectiveLevel().toInt() >= Level.INFO_INT;
+            return _log.isEnabledFor(Level.INFO);
         }
 
         public boolean isWarnEnabled() {
-            return _log.getEffectiveLevel().toInt() >= Level.WARN_INT;
+            return _log.isEnabledFor(Level.WARN);
         }
 
         public boolean isErrorEnabled() {
-            return _log.getEffectiveLevel().toInt() >= Level.ERROR_INT;
+            return _log.isEnabledFor(Level.ERROR);
         }
 
         public boolean isFatalEnabled() {
-            return _log.getEffectiveLevel().toInt() >= Level.FATAL_INT;
+            return _log.isEnabledFor(Level.FATAL);
         }
 
         public void trace(Object o) {



Mime
View raw message