1
我配置了pax日志记录在我的osgi运行时和测试标准osgi日志服务但没有记录日志记录。无论如何,所有其他日志API似乎按照[2]的预期工作。我错过了什么吗?是否支持pax日志记录支持标准osgi日志服务api
LogService logService;
public void start(BundleContext bundleContext) throws Exception {
ServiceReference ref = bundleContext.getServiceReference(LogService.class.getName());
if (ref != null)
{
logService = (LogService) bundleContext.getService(ref);
logService.log(LogService.LOG_INFO, " ----------- Testing OSGI logging on bundle start -------------------- ");
}
[1] https://ops4j1.jira.com/wiki/display/paxlogging/Installation
[2] https://ops4j1.jira.com/wiki/display/paxlogging/Pax+Logging
感谢