Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2016-03-31 16:32:19 +0000
committerThomas Watson2017-06-16 12:38:08 +0000
commit9566e37ecdca4821070a7a45836264566c9f3c37 (patch)
treeb0eb0cfd6a423b8fb79d08efe556f7c245843fa4 /bundles/org.eclipse.osgi/container
parent6ef43b45c7ae11c1859cf969d8e11f2dc53689cc (diff)
downloadrt.equinox.framework-9566e37ecdca4821070a7a45836264566c9f3c37.tar.gz
rt.equinox.framework-9566e37ecdca4821070a7a45836264566c9f3c37.tar.xz
rt.equinox.framework-9566e37ecdca4821070a7a45836264566c9f3c37.zip
Bug 486950 - [osgi R7] log service is being updated
Implement new getLogger method that takes a bundle Change-Id: Ibd50163c2390c5853274cfa72662fd775c7f02ec Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
Diffstat (limited to 'bundles/org.eclipse.osgi/container')
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogServiceImpl.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogServiceImpl.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogServiceImpl.java
index a2dd568d6..cc4d186cd 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogServiceImpl.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogServiceImpl.java
@@ -71,6 +71,15 @@ public class ExtendedLogServiceImpl implements ExtendedLogService {
return bundleLogService.getLogger(name);
}
+ @Override
+ public <L extends org.osgi.service.log.Logger> L getLogger(Bundle logBundle, String name, Class<L> loggerType) {
+ if (logBundle == null || (logBundle.getState() & (Bundle.INSTALLED | Bundle.UNINSTALLED)) != 0) {
+ throw new IllegalArgumentException("The bundle is not resolved: " + logBundle); //$NON-NLS-1$
+ }
+ ExtendedLogService bundleLogService = factory.getLogService(logBundle);
+ return bundleLogService.getLogger(name, loggerType);
+ }
+
public String getName() {
return getLogger((String) null).getName();
}

Back to the top