@Activate
protected void activate(ComponentContext componentContext) {
LoggingAppender loggingAppender = new LoggingAppender(DataHolder.getInstance().getLogBuffer());
Hashtable<String, Object> props = new Hashtable();
props.put("org.ops4j.pax.logging.appender.name", "InMemoryLogAppender");
componentContext.getBundleContext().registerService(PaxAppender.class, loggingAppender, props);
}
public LogCollector(BundleContext context) {
Dictionary<String, String> props = new Hashtable<>();
props.put("org.ops4j.pax.logging.appender.name", "ITestLogAppender");
reg = context.registerService(PaxAppender.class, this, props);
}