diff options
author | David Dykstal | 2006-08-17 13:41:45 +0000 |
---|---|---|
committer | David Dykstal | 2006-08-17 13:41:45 +0000 |
commit | 698c707f7c923b9bf7819eab9a222ef5685ec265 (patch) | |
tree | a6e3b8f5486b70626d7ada4f647ffc8173b3f7a0 | |
parent | 140cb9a9febb15c275bff35ff66f38a7fbb8f4bd (diff) | |
download | org.eclipse.tm-698c707f7c923b9bf7819eab9a222ef5685ec265.tar.gz org.eclipse.tm-698c707f7c923b9bf7819eab9a222ef5685ec265.tar.xz org.eclipse.tm-698c707f7c923b9bf7819eab9a222ef5685ec265.zip |
[refactor] add logging capability to core plugin
in preparation for moving some persistence classes
-rw-r--r-- | rse/plugins/org.eclipse.rse.core/META-INF/MANIFEST.MF | 3 | ||||
-rw-r--r-- | rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RSECorePlugin.java | 10 |
2 files changed, 12 insertions, 1 deletions
diff --git a/rse/plugins/org.eclipse.rse.core/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.core/META-INF/MANIFEST.MF index 96b2c8bd6..db768510a 100644 --- a/rse/plugins/org.eclipse.rse.core/META-INF/MANIFEST.MF +++ b/rse/plugins/org.eclipse.rse.core/META-INF/MANIFEST.MF @@ -6,7 +6,8 @@ Bundle-Version: 1.0.0.qualifier Bundle-Activator: org.eclipse.rse.core.RSECorePlugin Bundle-Localization: plugin Require-Bundle: org.eclipse.core.runtime, - org.eclipse.core.resources + org.eclipse.core.resources, + org.eclipse.rse.logging Eclipse-LazyStart: true Export-Package: org.eclipse.rse.core, org.eclipse.rse.core.filters, diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RSECorePlugin.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RSECorePlugin.java index 338670e7d..08d986bbd 100644 --- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RSECorePlugin.java +++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RSECorePlugin.java @@ -22,6 +22,8 @@ import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Plugin; import org.eclipse.core.runtime.Status; import org.eclipse.rse.core.internal.RSECoreRegistry; +import org.eclipse.rse.logging.Logger; +import org.eclipse.rse.logging.LoggerFactory; import org.osgi.framework.BundleContext; /** @@ -31,6 +33,7 @@ public class RSECorePlugin extends Plugin { // the shared instance private static RSECorePlugin plugin; + private Logger logger = null; /** * @return the local machine name @@ -70,6 +73,7 @@ public class RSECorePlugin extends Plugin { */ public void start(BundleContext context) throws Exception { super.start(context); + logger = LoggerFactory.getLogger(this); } /** @@ -77,6 +81,8 @@ public class RSECorePlugin extends Plugin { */ public void stop(BundleContext context) throws Exception { super.stop(context); + LoggerFactory.freeLogger(this); + logger = null; plugin = null; } @@ -96,6 +102,10 @@ public class RSECorePlugin extends Plugin { public IRSECoreRegistry getRegistry() { return RSECoreRegistry.getDefault(); } + + public Logger getLogger() { + return logger; + } private void log(Throwable t) { String pluginId = this.getBundle().getSymbolicName(); |