You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2008/09/25 06:56:26 UTC

svn commit: r698818 - /tuscany/branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java

Author: jsdelfino
Date: Wed Sep 24 21:56:26 2008
New Revision: 698818

URL: http://svn.apache.org/viewvc?rev=698818&view=rev
Log:
Cleaned up trace log a bit.

Modified:
    tuscany/branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java

Modified: tuscany/branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java?rev=698818&r1=698817&r2=698818&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java (original)
+++ tuscany/branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java Wed Sep 24 21:56:26 2008
@@ -208,7 +208,9 @@
             if (libraryBundle == null) {
                 logger.info("Generating third-party library bundle.");
                 for (String jarFile: jarFiles) {
-                    logger.info("Adding third-party jar: " + jarFile);
+                    if (logger.isLoggable(Level.FINE)) {
+                        logger.fine("Adding third-party jar: " + jarFile);
+                    }
                 }
                 long libraryStart = currentTimeMillis();
                 InputStream library = thirdPartyLibraryBundle(jarFiles);
@@ -240,7 +242,9 @@
                 if (bundle == null) {
                     long installStart = currentTimeMillis();
                     bundle = bundleContext.installBundle(bundleFile);
-                    logger.info("Bundle installed in " + (currentTimeMillis() - installStart) + " ms: " + string(bundle, false));
+                    if (logger.isLoggable(Level.FINE)) {
+                        logger.fine("Bundle installed in " + (currentTimeMillis() - installStart) + " ms: " + string(bundle, false));
+                    }
                     allBundles.put(bundleName, bundle);
                     installedBundles.add(bundle);
                 }
@@ -254,34 +258,42 @@
             String extensibilityBundleName = "org.apache.tuscany.sca.extensibility.equinox";
             Bundle extensibilityBundle = allBundles.get(extensibilityBundleName);
             if ((extensibilityBundle.getState() & Bundle.ACTIVE) == 0) {
-                logger.info("Starting bundle: " + string(extensibilityBundle, false));
+                if (logger.isLoggable(Level.FINE)) {
+                    logger.fine("Starting bundle: " + string(extensibilityBundle, false));
+                }
                 extensibilityBundle.start();
-            } else {
-                logger.info("Bundle is already started: " + string(extensibilityBundle, false));
+            } else if (logger.isLoggable(Level.FINE)) {
+                logger.fine("Bundle is already started: " + string(extensibilityBundle, false));
             }
             if ((launcherBundle.getState() & Bundle.ACTIVE) == 0) {
-                logger.info("Starting bundle: " + string(launcherBundle, false));
+                if (logger.isLoggable(Level.FINE)) {
+                    logger.fine("Starting bundle: " + string(launcherBundle, false));
+                }
                 launcherBundle.start();
-            } else {
-                logger.info("Bundle is already started: " + string(launcherBundle, false));
+            } else if (logger.isLoggable(Level.FINE)) {
+                logger.fine("Bundle is already started: " + string(launcherBundle, false));
             }
 
             // Start all our bundles for now to help diagnose any class loading issues
-            for (Bundle bundle: bundleContext.getBundles()) {
-                if (bundle.getSymbolicName().startsWith("org.apache.tuscany.sca")) {
-                    if ((bundle.getState() & Bundle.ACTIVE) == 0) {
-                        logger.info("Starting bundle: " + string(bundle, false));
-                        try {
-                            //bundle.start();
-                        } catch (Exception e) {
-                            logger.log(Level.SEVERE, e.getMessage(), e);
-                            // throw e;
-                        }
-                        logger.info("Bundle: " + string(bundle, false));
-                    }
-                }
-            }
-            logger.info("Tuscany bundles are started in " + (System.currentTimeMillis() - activateStart) + " ms.");
+//            for (Bundle bundle: bundleContext.getBundles()) {
+//                if (bundle.getSymbolicName().startsWith("org.apache.tuscany.sca")) {
+//                    if ((bundle.getState() & Bundle.ACTIVE) == 0) {
+//                        if (logger.isLoggable(Level.FINE)) {
+//                            logger.fine("Starting bundle: " + string(bundle, false));
+//                        }
+//                        try {
+//                            //bundle.start();
+//                        } catch (Exception e) {
+//                            logger.log(Level.SEVERE, e.getMessage(), e);
+//                            // throw e;
+//                        }
+//                        if (logger.isLoggable(Level.FINE)) {
+//                            logger.fine("Bundle: " + string(bundle, false));
+//                        }
+//                    }
+//                }
+//            }
+//            logger.info("Tuscany bundles are started in " + (System.currentTimeMillis() - activateStart) + " ms.");
             return bundleContext;
             
         } catch (Exception e) {
@@ -299,9 +311,9 @@
             for (int i = installedBundles.size() -1; i >= 0; i--) {
                 Bundle bundle = installedBundles.get(i);
                 try {
-                    //if (logger.isLoggable(Level.FINE)) {
-                    logger.info("Uninstalling bundle: " + string(bundle, false));
-                    //}
+                    if (logger.isLoggable(Level.FINE)) {
+                        logger.fine("Uninstalling bundle: " + string(bundle, false));
+                    }
                     bundle.uninstall();
                 } catch (Exception e) {
                     logger.log(Level.SEVERE, e.getMessage(), e);