Skip to content

Commit

Permalink
User proper logging instead of random dumps to System.err
Browse files Browse the repository at this point in the history
  • Loading branch information
nedtwigg committed Feb 7, 2023
1 parent b1c20db commit bab3181
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,16 @@
import org.osgi.framework.wiring.FrameworkWiring;
import org.osgi.resource.Requirement;
import org.osgi.service.packageadmin.PackageAdmin;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* A single-classloader implementation of OSGi which eagerly loads all the OSGi plugins it can find
* on the classpath.
*/
public class BundleContextSolstice extends ServiceRegistry {
private final Logger logger = LoggerFactory.getLogger(BundleContextSolstice.class);

private static final Set<String> DONT_ACTIVATE = Set.of("org.eclipse.osgi");

private static BundleContextSolstice instance;
Expand Down Expand Up @@ -429,7 +433,7 @@ private void activate() {
var bundleActivator = c.newInstance();
bundleActivator.start(BundleContextSolstice.this);
} catch (Exception e) {
e.printStackTrace();
logger.warn("Error in activator of " + getSymbolicName(), e);
}
}
state = ACTIVE;
Expand Down

0 comments on commit bab3181

Please sign in to comment.