felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r1064870 - in /felix/branches/org.apache.felix.framework-3.0.8-RC/src/main/java/org/apache/felix/framework: Felix.java Logger.java
Date Fri, 28 Jan 2011 20:56:54 GMT
Author: rickhall
Date: Fri Jan 28 20:56:54 2011
New Revision: 1064870

URL: http://svn.apache.org/viewvc?rev=1064870&view=rev
Log:
Port FELIX-2800 from trunk to 3.0.8 branch.

Modified:
    felix/branches/org.apache.felix.framework-3.0.8-RC/src/main/java/org/apache/felix/framework/Felix.java
    felix/branches/org.apache.felix.framework-3.0.8-RC/src/main/java/org/apache/felix/framework/Logger.java

Modified: felix/branches/org.apache.felix.framework-3.0.8-RC/src/main/java/org/apache/felix/framework/Felix.java
URL: http://svn.apache.org/viewvc/felix/branches/org.apache.felix.framework-3.0.8-RC/src/main/java/org/apache/felix/framework/Felix.java?rev=1064870&r1=1064869&r2=1064870&view=diff
==============================================================================
--- felix/branches/org.apache.felix.framework-3.0.8-RC/src/main/java/org/apache/felix/framework/Felix.java
(original)
+++ felix/branches/org.apache.felix.framework-3.0.8-RC/src/main/java/org/apache/felix/framework/Felix.java
Fri Jan 28 20:56:54 2011
@@ -4081,7 +4081,6 @@ public class Felix extends BundleImpl im
                             wires.add(candidateWire);
                             ((ModuleImpl) module).setWires(wires);
                             m_logger.log(
-                                module.getBundle(),
                                 Logger.LOG_DEBUG,
                                 "DYNAMIC WIRE: " + wires.get(wires.size() - 1));
                         }
@@ -4176,7 +4175,7 @@ public class Felix extends BundleImpl im
                     // only modules may not have wires.
                     for (int wireIdx = 0; wireIdx < wires.size(); wireIdx++)
                     {
-                        m_logger.log(module.getBundle(),
+                        m_logger.log(
                             Logger.LOG_DEBUG,
                             "WIRE: " + wires.get(wireIdx));
                     }

Modified: felix/branches/org.apache.felix.framework-3.0.8-RC/src/main/java/org/apache/felix/framework/Logger.java
URL: http://svn.apache.org/viewvc/felix/branches/org.apache.felix.framework-3.0.8-RC/src/main/java/org/apache/felix/framework/Logger.java?rev=1064870&r1=1064869&r2=1064870&view=diff
==============================================================================
--- felix/branches/org.apache.felix.framework-3.0.8-RC/src/main/java/org/apache/felix/framework/Logger.java
(original)
+++ felix/branches/org.apache.felix.framework-3.0.8-RC/src/main/java/org/apache/felix/framework/Logger.java
Fri Jan 28 20:56:54 2011
@@ -118,10 +118,20 @@ public class Logger implements ServiceLi
         Bundle bundle, ServiceReference sr, int level,
         String msg, Throwable throwable)
     {
-        String s = (sr == null) ? null : "SvcRef " + sr;
-        s = (s == null) ? null : s + " Bundle '" + bundle.getBundleId() + "'";
-        s = (s == null) ? msg : s + " " + msg;
-        s = (throwable == null) ? s : s + " (" + throwable + ")";
+        String s = "";
+        if (sr != null)
+        {
+            s = s + "SvcRef "  + sr + ": ";
+        }
+        else if (bundle != null)
+        {
+            s = s + "Bundle " + bundle.toString() + ": ";
+        }
+        s = s + msg;
+        if (throwable != null)
+        {
+            s = s + " (" + throwable + ")";
+        }
         switch (level)
         {
             case LOG_DEBUG:
@@ -311,4 +321,4 @@ public class Logger implements ServiceLi
             }
         }
     }
-}
\ No newline at end of file
+}



Mime
View raw message