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
感謝