felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r1690700 - /felix/trunk/resolver/src/main/java/org/apache/felix/resolver/Logger.java
Date Mon, 13 Jul 2015 15:16:35 GMT
Author: gnodet
Date: Mon Jul 13 15:16:35 2015
New Revision: 1690700

URL: http://svn.apache.org/r1690700
Log:
[FELIX-4942] Improve Logger to provide isDebugEnabled() and debug() methods

Modified:
    felix/trunk/resolver/src/main/java/org/apache/felix/resolver/Logger.java

Modified: felix/trunk/resolver/src/main/java/org/apache/felix/resolver/Logger.java
URL: http://svn.apache.org/viewvc/felix/trunk/resolver/src/main/java/org/apache/felix/resolver/Logger.java?rev=1690700&r1=1690699&r2=1690700&view=diff
==============================================================================
--- felix/trunk/resolver/src/main/java/org/apache/felix/resolver/Logger.java (original)
+++ felix/trunk/resolver/src/main/java/org/apache/felix/resolver/Logger.java Mon Jul 13 15:16:35
2015
@@ -75,14 +75,23 @@ public class Logger
         _log(level, msg, throwable);
     }
 
+    public boolean isDebugEnabled()
+    {
+        return m_logLevel >= LOG_DEBUG;
+    }
+
+    public final void debug(String msg)
+    {
+        _log(LOG_DEBUG, msg, null);
+    }
+
     protected void doLog(int level, String msg, Throwable throwable)
     {
         if (level > m_logLevel)
         {
             return;
         }
-        String s = "";
-        s = s + msg;
+        String s = msg;
         if (throwable != null)
         {
             s = s + " (" + throwable + ")";



Mime
View raw message