本文整理汇总了Java中org.ops4j.pax.logging.spi.PaxAppender类的典型用法代码示例。如果您正苦于以下问题:Java PaxAppender类的具体用法?Java PaxAppender怎么用?Java PaxAppender使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PaxAppender类属于org.ops4j.pax.logging.spi包,在下文中一共展示了PaxAppender类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doStart
import org.ops4j.pax.logging.spi.PaxAppender; //导入依赖的package包/类
@Override
protected void doStart() throws Exception {
super.doStart();
// start the executor before the registration
executor = endpoint.getCamelContext().getExecutorServiceManager().newSingleThreadExecutor(this, "PaxLoggingEventTask");
Dictionary<String, String> props = new Hashtable<String, String>();
props.put("org.ops4j.pax.logging.appender.name", endpoint.getAppender());
registration = endpoint.getComponent().getBundleContext().registerService(PaxAppender.class.getName(), this, props);
}
示例2: LogCollector
import org.ops4j.pax.logging.spi.PaxAppender; //导入依赖的package包/类
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);
}