add logging

This commit is contained in:
Fredrik Teschke
2015-01-27 16:55:54 +01:00
parent 336a96a18f
commit d322468f3d
2 changed files with 4 additions and 2 deletions
@@ -5,8 +5,6 @@ import java.util.Map;
/**
* Store that can save property values of {@link FileStorageService}s.
*
* TODO mongo store, register it, change startup level of filestorage bundle, replication
*
* @author Fredrik Teschke
*
*/
@@ -1,6 +1,7 @@
package com.sap.sse.filestorage.impl;
import java.util.Map.Entry;
import java.util.logging.Logger;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceEvent;
@@ -24,6 +25,8 @@ import com.sap.sse.osgi.CachedOsgiTypeBasedServiceFinderFactory;
*/
public class FileStorageManagementServiceImpl implements FileStorageManagementService,
ServiceTrackerCustomizer<FileStorageService, FileStorageService> {
private final Logger logger = Logger.getLogger(FileStorageManagementServiceImpl.class.getName());
private FileStorageService active;
private final TypeBasedServiceFinder<FileStorageService> serviceFinder;
@@ -80,6 +83,7 @@ public class FileStorageManagementServiceImpl implements FileStorageManagementSe
@Override
public FileStorageService addingService(ServiceReference<FileStorageService> reference) {
FileStorageService service = context.getService(reference);
logger.info("Found new FileStorageService: adding properties to " + service.getName());
for (Entry<String, String> property : propertyStore.readAllProperties(service.getName()).entrySet()) {
service.setProperty(property.getKey(), property.getValue());
}