本文整理匯總了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);
}