我在我的 osgi 运行时配置了 pax 日志记录并测试了标准 osgi 日志服务,但没有记录日志记录。无论如何,所有其他日志记录 API 似乎都按 [2] 的预期工作。我想念什么吗?
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
谢谢