summaryrefslogtreecommitdiffstats
path: root/branches/sca-equinox
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2008-09-25 04:56:26 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2008-09-25 04:56:26 +0000
commit4d274dcfda21cb24fbb619badc49a40fa45753aa (patch)
treeb7c261e03d6c5ac535d086f8a1c661e9502b3db2 /branches/sca-equinox
parent4622b9b261e10903be1cdcff1849437bed296f7b (diff)
Cleaned up trace log a bit.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@698818 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-equinox')
-rw-r--r--branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java64
1 files changed, 38 insertions, 26 deletions
diff --git a/branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java b/branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java
index d3c5ee2a9d..e95263d2f2 100644
--- a/branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java
+++ b/branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java
@@ -208,7 +208,9 @@ class EquinoxHost {
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 @@ class EquinoxHost {
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 @@ class EquinoxHost {
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 @@ class EquinoxHost {
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);