You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by cs...@apache.org on 2012/11/12 17:02:50 UTC
svn commit: r1408337 - in
/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw: ./
decorator/ handlers/ qos/ service/ util/
Author: cschneider
Date: Mon Nov 12 16:02:46 2012
New Revision: 1408337
URL: http://svn.apache.org/viewvc?rev=1408337&view=rev
Log:
DOSGI-135 Forgot some loggers
Modified:
cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/Activator.java
cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/decorator/InterfaceRule.java
cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/AbstractConfigurationHandler.java
cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/AbstractPojoConfigurationTypeHandler.java
cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/ConfigTypeHandlerFactory.java
cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceConfigurationTypeHandler.java
cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSHttpServiceConfigurationTypeHandler.java
cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSPojoConfigurationTypeHandler.java
cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSUtils.java
cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/PojoConfigurationTypeHandler.java
cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/WsdlConfigurationTypeHandler.java
cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/qos/IntentMap.java
cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/qos/IntentUtils.java
cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ClientServiceFactory.java
cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/EventAdminHelper.java
cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/EventProducer.java
cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ExportRegistrationImpl.java
cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ImportRegistrationImpl.java
cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceAdminCore.java
cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceadminFactory.java
cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/util/ClassUtils.java
cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/util/OsgiUtils.java
cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/util/Utils.java
Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/Activator.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/Activator.java?rev=1408337&r1=1408336&r2=1408337&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/Activator.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/Activator.java Mon Nov 12 16:02:46 2012
@@ -20,11 +20,9 @@ package org.apache.cxf.dosgi.dsw;
import java.util.Dictionary;
import java.util.Hashtable;
-import java.util.logging.Logger;
import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
-import org.apache.cxf.common.logging.LogUtils;
import org.apache.cxf.dosgi.dsw.decorator.ServiceDecorator;
import org.apache.cxf.dosgi.dsw.decorator.ServiceDecoratorImpl;
import org.apache.cxf.dosgi.dsw.qos.IntentMap;
@@ -36,13 +34,15 @@ import org.osgi.framework.ServiceRegistr
import org.osgi.service.cm.ConfigurationException;
import org.osgi.service.cm.ManagedService;
import org.osgi.service.remoteserviceadmin.RemoteServiceAdmin;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.osgi.context.BundleContextAware;
// registered as spring bean -> start / stop called accordingly
public class Activator implements ManagedService,BundleContextAware {
- private final static Logger LOG = LogUtils.getL7dLogger(Activator.class);
+ private final static Logger LOG = LoggerFactory.getLogger(Activator.class);
private static final String CONFIG_SERVICE_PID = "cxf-dsw";
private BundleContext bc;
@@ -94,7 +94,7 @@ public class Activator implements Manage
}
public void stop() {
- LOG.fine("RemoteServiceAdmin Implementation is shutting down now");
+ LOG.debug("RemoteServiceAdmin Implementation is shutting down now");
// This also triggers the unimport and unexport of the remote services
rsaFactoryReg.unregister();
@@ -103,7 +103,7 @@ public class Activator implements Manage
// shutdown the CXF Bus -> Causes also the shutdown of the embedded HTTP server
Bus b = BusFactory.getDefaultBus();
if (b != null) {
- LOG.fine("Shutting down the CXF Bus");
+ LOG.debug("Shutting down the CXF Bus");
b.shutdown(true);
}
Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/decorator/InterfaceRule.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/decorator/InterfaceRule.java?rev=1408337&r1=1408336&r2=1408337&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/decorator/InterfaceRule.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/decorator/InterfaceRule.java Mon Nov 12 16:02:46 2012
@@ -21,18 +21,17 @@ package org.apache.cxf.dosgi.dsw.decorat
import java.lang.reflect.Constructor;
import java.util.HashMap;
import java.util.Map;
-import java.util.logging.Level;
-import java.util.logging.Logger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import org.apache.cxf.common.logging.LogUtils;
import org.osgi.framework.Bundle;
import org.osgi.framework.Constants;
import org.osgi.framework.ServiceReference;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class InterfaceRule implements Rule {
- private static final Logger LOG = LogUtils.getL7dLogger(InterfaceRule.class);
+ private static final Logger LOG = LoggerFactory.getLogger(InterfaceRule.class);
private final Bundle bundle;
private final Pattern matchPattern;
@@ -57,7 +56,7 @@ public class InterfaceRule implements Ru
Constructor<?> ctor = cls.getConstructor(new Class [] {String.class});
obj = ctor.newInstance(value);
} catch (Throwable th) {
- LOG.log(Level.WARNING, "Could not handle property '" + name +
+ LOG.warn("Could not handle property '" + name +
"' with value '" + value + "' of type: " + type, th);
return;
}
Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/AbstractConfigurationHandler.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/AbstractConfigurationHandler.java?rev=1408337&r1=1408336&r2=1408337&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/AbstractConfigurationHandler.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/AbstractConfigurationHandler.java Mon Nov 12 16:02:46 2012
@@ -28,18 +28,18 @@ import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
-import java.util.logging.Logger;
-import org.apache.cxf.common.logging.LogUtils;
import org.apache.cxf.dosgi.dsw.Constants;
import org.apache.cxf.dosgi.dsw.qos.IntentUtils;
import org.apache.cxf.dosgi.dsw.util.OsgiUtils;
import org.osgi.framework.BundleContext;
import org.osgi.service.remoteserviceadmin.RemoteConstants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public abstract class AbstractConfigurationHandler implements ConfigurationTypeHandler {
- private static final Logger LOG = LogUtils.getL7dLogger(AbstractConfigurationHandler.class);
+ private static final Logger LOG = LoggerFactory.getLogger(AbstractConfigurationHandler.class);
final Map<String, Object> handlerProps;
protected BundleContext bundleContext;
@@ -157,7 +157,7 @@ public abstract class AbstractConfigurat
if (!skey.startsWith("."))
endpointProps.put(skey, entry.getValue());
} catch (ClassCastException e) {
- LOG.warning("ServiceProperties Map contained non String key. Skipped " + entry + " "
+ LOG.warn("ServiceProperties Map contained non String key. Skipped " + entry + " "
+ e.getLocalizedMessage());
}
}
Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/AbstractPojoConfigurationTypeHandler.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/AbstractPojoConfigurationTypeHandler.java?rev=1408337&r1=1408336&r2=1408337&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/AbstractPojoConfigurationTypeHandler.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/AbstractPojoConfigurationTypeHandler.java Mon Nov 12 16:02:46 2012
@@ -28,12 +28,10 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
-import java.util.logging.Logger;
import javax.xml.namespace.QName;
import org.apache.cxf.binding.BindingConfiguration;
-import org.apache.cxf.common.logging.LogUtils;
import org.apache.cxf.common.util.PackageUtils;
import org.apache.cxf.dosgi.dsw.Constants;
import org.apache.cxf.dosgi.dsw.qos.IntentMap;
@@ -51,9 +49,11 @@ import org.apache.cxf.jaxws.JaxWsProxyFa
import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
import org.osgi.framework.BundleContext;
import org.osgi.service.remoteserviceadmin.RemoteConstants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public abstract class AbstractPojoConfigurationTypeHandler extends AbstractConfigurationHandler {
- private static final Logger LOG = LogUtils.getL7dLogger(AbstractPojoConfigurationTypeHandler.class);
+ private static final Logger LOG = LoggerFactory.getLogger(AbstractPojoConfigurationTypeHandler.class);
private static final String PROVIDED_INTENT_VALUE = "PROVIDED";
private static final String CONFIGURATION_TYPE = "org.apache.cxf.ws";
@@ -326,14 +326,14 @@ public abstract class AbstractPojoConfig
allIntents.addAll(extraIntents);
allIntents.addAll(oldIntents);
- LOG.fine("Intents asserted: " + allIntents);
+ LOG.debug("Intents asserted: " + allIntents);
return allIntents.toArray(new String[allIntents.size()]);
}
private IntentMap mergeWithMaster(BundleContext dswContext, IntentMap intentMap) {
synchronized (this) {
if (masterMap == null) {
- LOG.fine("Loading master intent map");
+ LOG.debug("Loading master intent map");
masterMap = getIntentMap(dswContext);
}
}
@@ -342,10 +342,10 @@ public abstract class AbstractPojoConfig
while (masterKeys.hasNext()) {
String masterKey = masterKeys.next();
if (intentMap.get(masterKey) == null) {
- LOG.fine("Merging in master intent map entry: " + masterKey);
+ LOG.debug("Merging in master intent map entry: " + masterKey);
intentMap.getIntents().put(masterKey, masterMap.get(masterKey));
} else {
- LOG.fine("Overridden master intent map entry: " + masterKey);
+ LOG.debug("Overridden master intent map entry: " + masterKey);
}
}
}
@@ -355,7 +355,7 @@ public abstract class AbstractPojoConfig
protected String getPojoAddress(Map sd, Class<?> iClass) {
String address = OsgiUtils.getProperty(sd, RemoteConstants.ENDPOINT_ID);
if(address == null && sd.get(RemoteConstants.ENDPOINT_ID)!=null ){
- LOG.severe("Could not use address property " + RemoteConstants.ENDPOINT_ID );
+ LOG.error("Could not use address property " + RemoteConstants.ENDPOINT_ID );
return null;
}
@@ -364,7 +364,7 @@ public abstract class AbstractPojoConfig
address = OsgiUtils.getProperty(sd, Constants.WS_ADDRESS_PROPERTY);
}
if(address == null && sd.get(Constants.WS_ADDRESS_PROPERTY)!=null ){
- LOG.severe("Could not use address property " + Constants.WS_ADDRESS_PROPERTY );
+ LOG.error("Could not use address property " + Constants.WS_ADDRESS_PROPERTY );
return null;
}
@@ -372,7 +372,7 @@ public abstract class AbstractPojoConfig
address = OsgiUtils.getProperty(sd, Constants.WS_ADDRESS_PROPERTY_OLD);
}
if(address == null && sd.get(Constants.WS_ADDRESS_PROPERTY_OLD)!=null ){
- LOG.severe("Could not use address property " + Constants.WS_ADDRESS_PROPERTY_OLD);
+ LOG.error("Could not use address property " + Constants.WS_ADDRESS_PROPERTY_OLD);
return null;
}
@@ -380,7 +380,7 @@ public abstract class AbstractPojoConfig
address = OsgiUtils.getProperty(sd, Constants.RS_ADDRESS_PROPERTY);
}
if(address == null && sd.get(Constants.RS_ADDRESS_PROPERTY)!=null ){
- LOG.severe("Could not use address property " + Constants.RS_ADDRESS_PROPERTY);
+ LOG.error("Could not use address property " + Constants.RS_ADDRESS_PROPERTY);
return null;
}
Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/ConfigTypeHandlerFactory.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/ConfigTypeHandlerFactory.java?rev=1408337&r1=1408336&r2=1408337&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/ConfigTypeHandlerFactory.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/ConfigTypeHandlerFactory.java Mon Nov 12 16:02:46 2012
@@ -21,17 +21,17 @@ package org.apache.cxf.dosgi.dsw.handler
import java.util.Collection;
import java.util.List;
import java.util.Map;
-import java.util.logging.Logger;
-import org.apache.cxf.common.logging.LogUtils;
import org.apache.cxf.dosgi.dsw.Constants;
import org.apache.cxf.dosgi.dsw.qos.IntentUtils;
import org.apache.cxf.dosgi.dsw.util.OsgiUtils;
import org.osgi.framework.BundleContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public final class ConfigTypeHandlerFactory {
- private static final Logger LOG = LogUtils.getL7dLogger(ConfigTypeHandlerFactory.class);
+ private static final Logger LOG = LoggerFactory.getLogger(ConfigTypeHandlerFactory.class);
private static final ConfigTypeHandlerFactory FACTORY = new ConfigTypeHandlerFactory();
private ConfigTypeHandlerFactory() {
@@ -65,7 +65,7 @@ public final class ConfigTypeHandlerFact
return new WsdlConfigurationTypeHandler(dswBC, props);
}
- LOG.warning("None of the configuration types in " + configurationTypes + " is supported.");
+ LOG.warn("None of the configuration types in " + configurationTypes + " is supported.");
return null;
}
Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceConfigurationTypeHandler.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceConfigurationTypeHandler.java?rev=1408337&r1=1408336&r2=1408337&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceConfigurationTypeHandler.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceConfigurationTypeHandler.java Mon Nov 12 16:02:46 2012
@@ -27,12 +27,10 @@ import java.util.Map;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArraySet;
import java.util.logging.Level;
-import java.util.logging.Logger;
import org.apache.commons.lang.StringUtils;
import org.apache.cxf.Bus;
import org.apache.cxf.aegis.databinding.AegisDatabinding;
-import org.apache.cxf.common.logging.LogUtils;
import org.apache.cxf.databinding.DataBinding;
import org.apache.cxf.dosgi.dsw.Constants;
import org.apache.cxf.dosgi.dsw.util.OsgiUtils;
@@ -53,9 +51,11 @@ import org.osgi.service.http.HttpService
import org.osgi.service.remoteserviceadmin.EndpointDescription;
import org.osgi.service.remoteserviceadmin.RemoteConstants;
import org.osgi.util.tracker.ServiceTracker;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class HttpServiceConfigurationTypeHandler extends AbstractPojoConfigurationTypeHandler {
- private static final Logger LOG = LogUtils.getL7dLogger(HttpServiceConfigurationTypeHandler.class);
+ private static final Logger LOG = LoggerFactory.getLogger(HttpServiceConfigurationTypeHandler.class);
Set<ServiceReference> httpServiceReferences = new CopyOnWriteArraySet<ServiceReference>();
Map<Long, String> exportedAliases = Collections.synchronizedMap(new HashMap<Long, String>());
@@ -85,7 +85,7 @@ public class HttpServiceConfigurationTyp
BundleContext callingContext, Class<?> iClass, EndpointDescription sd) {
String address = getHttpServiceAddress(sd.getProperties(), iClass);
if (address == null) {
- LOG.warning("Remote address is unavailable");
+ LOG.warn("Remote address is unavailable");
// TODO: fire Event
return null;
}
@@ -117,7 +117,7 @@ public class HttpServiceConfigurationTyp
Object proxy = getProxy(factory.create(), iClass);
return proxy;
} catch (Exception e) {
- LOG.log(Level.WARNING, "proxy creation failed", e);
+ LOG.warn("proxy creation failed", e);
} finally {
Thread.currentThread().setContextClassLoader(oldClassLoader);
}
@@ -259,7 +259,7 @@ public class HttpServiceConfigurationTyp
protected String getHttpServiceAddress(Map sd, Class<?> iClass) {
String address = OsgiUtils.getProperty(sd, RemoteConstants.ENDPOINT_ID);
if(address == null && sd.get(RemoteConstants.ENDPOINT_ID)!=null ){
- LOG.severe("Could not use address property " + RemoteConstants.ENDPOINT_ID );
+ LOG.error("Could not use address property " + RemoteConstants.ENDPOINT_ID );
return null;
}
@@ -268,7 +268,7 @@ public class HttpServiceConfigurationTyp
address = OsgiUtils.getProperty(sd, Constants.WS_ADDRESS_PROPERTY);
}
if(address == null && sd.get(Constants.WS_ADDRESS_PROPERTY)!=null ){
- LOG.severe("Could not use address property " + Constants.WS_ADDRESS_PROPERTY );
+ LOG.error("Could not use address property " + Constants.WS_ADDRESS_PROPERTY );
return null;
}
@@ -276,7 +276,7 @@ public class HttpServiceConfigurationTyp
address = OsgiUtils.getProperty(sd, Constants.WS_ADDRESS_PROPERTY_OLD);
}
if(address == null && sd.get(Constants.WS_ADDRESS_PROPERTY_OLD)!=null ){
- LOG.severe("Could not use address property " + Constants.WS_ADDRESS_PROPERTY_OLD);
+ LOG.error("Could not use address property " + Constants.WS_ADDRESS_PROPERTY_OLD);
return null;
}
@@ -284,7 +284,7 @@ public class HttpServiceConfigurationTyp
address = OsgiUtils.getProperty(sd, Constants.RS_ADDRESS_PROPERTY);
}
if(address == null && sd.get(Constants.RS_ADDRESS_PROPERTY)!=null ){
- LOG.severe("Could not use address property " + Constants.RS_ADDRESS_PROPERTY);
+ LOG.error("Could not use address property " + Constants.RS_ADDRESS_PROPERTY);
return null;
}
@@ -300,11 +300,11 @@ public class HttpServiceConfigurationTyp
*/
protected void registerUnexportHook(ServiceReference sref, String alias) {
final Long sid = (Long) sref.getProperty(org.osgi.framework.Constants.SERVICE_ID);
- LOG.log(Level.FINE, "Registering service listener for service with ID {0}", sid);
+ LOG.debug("Registering service listener for service with ID {}", sid);
String previous = exportedAliases.put(sid, alias);
if(previous != null) {
- LOG.log(Level.WARNING, "Overwriting service export for service with ID {0}", sid);
+ LOG.warn("Overwriting service export for service with ID {}", sid);
}
try {
@@ -321,35 +321,32 @@ public class HttpServiceConfigurationTyp
final String alias = exportedAliases.remove(sid);
if(alias != null) {
- LOG.log(Level.FINE, "Unexporting HTTP servlet for alias ''{0}''...", alias);
+ LOG.debug("Unexporting HTTP servlet for alias ''{}''...", alias);
HttpService http = getHttpService();
if(http != null) {
try {
http.unregister(alias);
} catch(Exception e) {
- LOG.log(Level.WARNING,
- "An exception occurred while unregistering service for HTTP servlet alias '"
+ LOG.warn("An exception occurred while unregistering service for HTTP servlet alias '"
+ alias + "'", e);
}
} else {
- LOG.log(Level.WARNING,
- "Unable to unexport HTTP servlet for alias ''{0}'': no HTTP service available",
+ LOG.warn("Unable to unexport HTTP servlet for alias ''{}'': no HTTP service available",
alias);
}
} else {
- LOG.log(Level.WARNING,
- "Unable to unexport HTTP servlet for service class ''{0}'', service-id {1}: no servlet alias found",
+ LOG.warn("Unable to unexport HTTP servlet for service class ''{0}'', service-id {1}: no servlet alias found",
new Object[] {sref.getProperty(org.osgi.framework.Constants.OBJECTCLASS), sid});
}
}
}
}, f.toString());
} else {
- LOG.warning("Service listener could not be started. The service will not be automatically unexported.");
+ LOG.warn("Service listener could not be started. The service will not be automatically unexported.");
}
} catch (InvalidSyntaxException e) {
- LOG.log(Level.WARNING, "Service listener could not be started. The service will not be automatically unexported.", e);
+ LOG.warn("Service listener could not be started. The service will not be automatically unexported.", e);
}
}
Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSHttpServiceConfigurationTypeHandler.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSHttpServiceConfigurationTypeHandler.java?rev=1408337&r1=1408336&r2=1408337&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSHttpServiceConfigurationTypeHandler.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSHttpServiceConfigurationTypeHandler.java Mon Nov 12 16:02:46 2012
@@ -21,10 +21,7 @@ package org.apache.cxf.dosgi.dsw.handler
import java.net.URL;
import java.util.List;
import java.util.Map;
-import java.util.logging.Logger;
-
import org.apache.cxf.Bus;
-import org.apache.cxf.common.logging.LogUtils;
import org.apache.cxf.dosgi.dsw.Constants;
import org.apache.cxf.dosgi.dsw.util.OsgiUtils;
import org.apache.cxf.endpoint.Server;
@@ -33,10 +30,11 @@ import org.apache.cxf.jaxrs.lifecycle.Si
import org.apache.cxf.jaxrs.model.UserResource;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
-import org.osgi.service.remoteserviceadmin.EndpointDescription;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class JaxRSHttpServiceConfigurationTypeHandler extends HttpServiceConfigurationTypeHandler {
- private static final Logger LOG = LogUtils.getL7dLogger(JaxRSHttpServiceConfigurationTypeHandler.class);
+ private static final Logger LOG = LoggerFactory.getLogger(JaxRSHttpServiceConfigurationTypeHandler.class);
protected JaxRSHttpServiceConfigurationTypeHandler(BundleContext dswBC,
Map<String, Object> handlerProps) {
Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSPojoConfigurationTypeHandler.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSPojoConfigurationTypeHandler.java?rev=1408337&r1=1408336&r2=1408337&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSPojoConfigurationTypeHandler.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSPojoConfigurationTypeHandler.java Mon Nov 12 16:02:46 2012
@@ -24,9 +24,7 @@ import java.util.Map;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArraySet;
import java.util.logging.Level;
-import java.util.logging.Logger;
-import org.apache.cxf.common.logging.LogUtils;
import org.apache.cxf.dosgi.dsw.Constants;
import org.apache.cxf.dosgi.dsw.util.OsgiUtils;
import org.apache.cxf.endpoint.Server;
@@ -39,9 +37,11 @@ import org.apache.cxf.jaxrs.model.UserRe
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
import org.osgi.service.remoteserviceadmin.EndpointDescription;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class JaxRSPojoConfigurationTypeHandler extends PojoConfigurationTypeHandler {
- private static final Logger LOG = LogUtils.getL7dLogger(JaxRSPojoConfigurationTypeHandler.class);
+ private static final Logger LOG = LoggerFactory.getLogger(JaxRSPojoConfigurationTypeHandler.class);
Set<ServiceReference> httpServiceReferences = new CopyOnWriteArraySet<ServiceReference>();
@@ -58,7 +58,7 @@ public class JaxRSPojoConfigurationTypeH
String address = getPojoAddress(sd, iClass);
if (address == null) {
- LOG.warning("Remote address is unavailable");
+ LOG.warn("Remote address is unavailable");
return null;
}
@@ -75,7 +75,7 @@ public class JaxRSPojoConfigurationTypeH
cl.addLoader(Client.class.getClassLoader());
return createJaxrsProxy(address, callingContext, dswContext, iClass, cl, sd);
} catch (Throwable e) {
- LOG.log(Level.WARNING, "proxy creation failed", e);
+ LOG.warn("proxy creation failed", e);
}
return null;
Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSUtils.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSUtils.java?rev=1408337&r1=1408336&r2=1408337&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSUtils.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSUtils.java Mon Nov 12 16:02:46 2012
@@ -24,10 +24,7 @@ import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import org.apache.cxf.common.logging.LogUtils;
import org.apache.cxf.dosgi.dsw.util.ClassUtils;
import org.apache.cxf.dosgi.dsw.util.OsgiUtils;
import org.apache.cxf.jaxrs.model.UserResource;
@@ -36,10 +33,12 @@ import org.apache.cxf.jaxrs.utils.Resour
import org.osgi.framework.BundleContext;
import org.osgi.framework.Constants;
import org.osgi.framework.ServiceReference;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class JaxRSUtils {
- private static final Logger LOG = LogUtils.getL7dLogger(JaxRSUtils.class);
+ private static final Logger LOG = LoggerFactory.getLogger(JaxRSUtils.class);
public final static String MODEL_FOLDER = "/OSGI-INF/cxf/jaxrs/";
public final static String DEFAULT_MODEL = "/OSGI-INF/cxf/jaxrs/model.xml";
@@ -92,7 +91,7 @@ public class JaxRSUtils {
}
}
} catch (Exception ex) {
- LOG.log(Level.FINE, "Problems finding JAXRS providers " + ex.getMessage(), ex);
+ LOG.debug("Problems finding JAXRS providers " + ex.getMessage(), ex);
}
return providers;
}
Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/PojoConfigurationTypeHandler.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/PojoConfigurationTypeHandler.java?rev=1408337&r1=1408336&r2=1408337&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/PojoConfigurationTypeHandler.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/PojoConfigurationTypeHandler.java Mon Nov 12 16:02:46 2012
@@ -20,10 +20,8 @@ package org.apache.cxf.dosgi.dsw.handler
import java.util.Map;
import java.util.logging.Level;
-import java.util.logging.Logger;
import org.apache.cxf.aegis.databinding.AegisDatabinding;
-import org.apache.cxf.common.logging.LogUtils;
import org.apache.cxf.databinding.DataBinding;
import org.apache.cxf.dosgi.dsw.Constants;
import org.apache.cxf.dosgi.dsw.util.OsgiUtils;
@@ -35,9 +33,11 @@ import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
import org.osgi.service.remoteserviceadmin.EndpointDescription;
import org.osgi.service.remoteserviceadmin.RemoteConstants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class PojoConfigurationTypeHandler extends AbstractPojoConfigurationTypeHandler {
- private static final Logger LOG = LogUtils.getL7dLogger(PojoConfigurationTypeHandler.class);
+ private static final Logger LOG = LoggerFactory.getLogger(PojoConfigurationTypeHandler.class);
public PojoConfigurationTypeHandler(BundleContext dswBC, Map<String, Object> handlerProps) {
super(dswBC, handlerProps);
@@ -49,7 +49,7 @@ public class PojoConfigurationTypeHandle
//
String address = getPojoAddress(sd.getProperties(), iClass);
if (address == null) {
- LOG.warning("Remote address is unavailable");
+ LOG.warn("Remote address is unavailable");
// TODO: fire Event
return null;
}
@@ -81,7 +81,7 @@ public class PojoConfigurationTypeHandle
Object proxy = getProxy(factory.create(), iClass);
return proxy;
} catch (Exception e) {
- LOG.log(Level.WARNING, "proxy creation failed", e);
+ LOG.warn("proxy creation failed", e);
} finally {
Thread.currentThread().setContextClassLoader(oldClassLoader);
}
@@ -134,7 +134,7 @@ public class PojoConfigurationTypeHandle
protected String getPojoAddress(Map sd, Class<?> iClass) {
String address = OsgiUtils.getProperty(sd, RemoteConstants.ENDPOINT_ID);
if(address == null && sd.get(RemoteConstants.ENDPOINT_ID)!=null ){
- LOG.severe("Could not use address property " + RemoteConstants.ENDPOINT_ID );
+ LOG.error("Could not use address property " + RemoteConstants.ENDPOINT_ID );
return null;
}
@@ -142,7 +142,7 @@ public class PojoConfigurationTypeHandle
address = OsgiUtils.getProperty(sd, Constants.WS_ADDRESS_PROPERTY);
}
if(address == null && sd.get(Constants.WS_ADDRESS_PROPERTY)!=null ){
- LOG.severe("Could not use address property " + Constants.WS_ADDRESS_PROPERTY );
+ LOG.error("Could not use address property " + Constants.WS_ADDRESS_PROPERTY );
return null;
}
@@ -150,7 +150,7 @@ public class PojoConfigurationTypeHandle
address = OsgiUtils.getProperty(sd, Constants.WS_ADDRESS_PROPERTY_OLD);
}
if(address == null && sd.get(Constants.WS_ADDRESS_PROPERTY_OLD)!=null ){
- LOG.severe("Could not use address property " + Constants.WS_ADDRESS_PROPERTY_OLD);
+ LOG.error("Could not use address property " + Constants.WS_ADDRESS_PROPERTY_OLD);
return null;
}
@@ -158,7 +158,7 @@ public class PojoConfigurationTypeHandle
address = OsgiUtils.getProperty(sd, Constants.RS_ADDRESS_PROPERTY);
}
if(address == null && sd.get(Constants.RS_ADDRESS_PROPERTY)!=null ){
- LOG.severe("Could not use address property " + Constants.RS_ADDRESS_PROPERTY);
+ LOG.error("Could not use address property " + Constants.RS_ADDRESS_PROPERTY);
return null;
}
Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/WsdlConfigurationTypeHandler.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/WsdlConfigurationTypeHandler.java?rev=1408337&r1=1408336&r2=1408337&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/WsdlConfigurationTypeHandler.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/WsdlConfigurationTypeHandler.java Mon Nov 12 16:02:46 2012
@@ -21,13 +21,11 @@ package org.apache.cxf.dosgi.dsw.handler
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Map;
-import java.util.logging.Logger;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import org.apache.cxf.Bus;
-import org.apache.cxf.common.logging.LogUtils;
import org.apache.cxf.common.util.PackageUtils;
import org.apache.cxf.databinding.DataBinding;
import org.apache.cxf.dosgi.dsw.Constants;
@@ -39,10 +37,12 @@ import org.apache.cxf.jaxws.JaxWsServerF
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
import org.osgi.service.remoteserviceadmin.EndpointDescription;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class WsdlConfigurationTypeHandler extends HttpServiceConfigurationTypeHandler {
private static final String CONFIGURATION_TYPE = "wsdl";
- private static final Logger LOG = LogUtils.getL7dLogger(WsdlConfigurationTypeHandler.class);
+ private static final Logger LOG = LoggerFactory.getLogger(WsdlConfigurationTypeHandler.class);
public WsdlConfigurationTypeHandler(BundleContext dswBC,
@@ -62,7 +62,7 @@ public class WsdlConfigurationTypeHandle
String wsdlAddressProp = getWsdlAddress(sd, iClass);
if (wsdlAddressProp == null) {
- LOG.warning("WSDL address is unavailable");
+ LOG.warn("WSDL address is unavailable");
return null;
}
@@ -70,7 +70,7 @@ public class WsdlConfigurationTypeHandle
try {
wsdlAddress = new URL(wsdlAddressProp);
} catch (MalformedURLException ex) {
- LOG.warning("WSDL address is malformed");
+ LOG.warn("WSDL address is malformed");
return null;
}
Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/qos/IntentMap.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/qos/IntentMap.java?rev=1408337&r1=1408336&r2=1408337&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/qos/IntentMap.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/qos/IntentMap.java Mon Nov 12 16:02:46 2012
@@ -19,13 +19,13 @@
package org.apache.cxf.dosgi.dsw.qos;
import java.util.Map;
-import java.util.logging.Logger;
-import org.apache.cxf.common.logging.LogUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public final class IntentMap {
- private static final Logger LOG = LogUtils.getL7dLogger(IntentMap.class);
+ private static final Logger LOG = LoggerFactory.getLogger(IntentMap.class);
private Map<String, Object> intents;
Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/qos/IntentUtils.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/qos/IntentUtils.java?rev=1408337&r1=1408336&r2=1408337&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/qos/IntentUtils.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/qos/IntentUtils.java Mon Nov 12 16:02:46 2012
@@ -4,16 +4,19 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import java.util.logging.Level;
import org.apache.cxf.dosgi.dsw.util.OsgiUtils;
import org.apache.cxf.dosgi.dsw.util.Utils;
import org.apache.cxf.ws.policy.spring.PolicyNamespaceHandler;
import org.osgi.framework.BundleContext;
import org.osgi.service.remoteserviceadmin.RemoteConstants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext;
public class IntentUtils {
+ private static final Logger LOG = LoggerFactory.getLogger(IntentUtils.class);
+
private static final String[] INTENT_MAP = {
"/OSGI-INF/cxf/intents/intent-map.xml"
};
@@ -40,7 +43,7 @@ public class IntentUtils {
IntentMap im = IntentUtils.readIntentMap(bundleContext);
if (im == null) {
// Couldn't read an intent map
- OsgiUtils.LOG.log(Level.FINE, "Using default intent map");
+ LOG.debug("Using default intent map");
im = new IntentMap();
im.setIntents(new HashMap<String, Object>());
}
@@ -63,21 +66,21 @@ public class IntentUtils {
ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(PolicyNamespaceHandler.class.getClassLoader());
- OsgiUtils.LOG.fine("Loading Intent map from "+springIntentLocations);
+ LOG.debug("Loading Intent map from {}", springIntentLocations);
OsgiBundleXmlApplicationContext ctx = new OsgiBundleXmlApplicationContext(springIntentLocations
.toArray(new String[] {}));
ctx.setPublishContextAsService(false);
ctx.setBundleContext(bundleContext);
ctx.refresh();
- OsgiUtils.LOG.fine("application context: " + ctx);
+ LOG.debug("application context: {}", ctx);
IntentMap im = (IntentMap)ctx.getBean("intentMap");
- OsgiUtils.LOG.fine("retrieved intent map: " + im);
+ LOG.debug("retrieved intent map: {}", im);
Thread.currentThread().setContextClassLoader(oldClassLoader);
return im;
} catch (Throwable t) {
- OsgiUtils.LOG.log(Level.WARNING, "Intent map load failed: ", t);
+ LOG.warn("Intent map load failed: ", t);
return null;
}
}
Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ClientServiceFactory.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ClientServiceFactory.java?rev=1408337&r1=1408336&r2=1408337&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ClientServiceFactory.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ClientServiceFactory.java Mon Nov 12 16:02:46 2012
@@ -21,9 +21,7 @@ package org.apache.cxf.dosgi.dsw.service
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.logging.Level;
-import java.util.logging.Logger;
-import org.apache.cxf.common.logging.LogUtils;
import org.apache.cxf.dosgi.dsw.handlers.ConfigurationTypeHandler;
import org.apache.cxf.dosgi.dsw.handlers.IntentUnsatifiedException;
import org.osgi.framework.Bundle;
@@ -31,10 +29,12 @@ import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceFactory;
import org.osgi.framework.ServiceRegistration;
import org.osgi.service.remoteserviceadmin.EndpointDescription;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class ClientServiceFactory implements ServiceFactory {
- private static final Logger LOG = LogUtils.getL7dLogger(ClientServiceFactory.class);
+ private static final Logger LOG = LoggerFactory.getLogger(ClientServiceFactory.class);
private BundleContext dswContext;
private Class<?> iClass;
@@ -59,7 +59,7 @@ public class ClientServiceFactory implem
String interfaceName = sd.getInterfaces() != null && sd.getInterfaces().size() > 0 ? (String)sd
.getInterfaces().toArray()[0] : null;
- LOG.fine("getService() from serviceFactory for " + interfaceName);
+ LOG.debug("getService() from serviceFactory for {}", interfaceName);
try {
Object proxy = AccessController.doPrivileged(new PrivilegedAction<Object>() {
@@ -77,7 +77,7 @@ public class ClientServiceFactory implem
LOG.info("Did not create proxy for " + interfaceName + " because intent " + iue.getIntent()
+ " could not be satisfied");
} catch (Exception ex) {
- LOG.log(Level.WARNING, "Problem creating a remote proxy for " + interfaceName
+ LOG.warn("Problem creating a remote proxy for " + interfaceName
+ " from CXF FindHook: ", ex);
}
@@ -99,7 +99,7 @@ public class ClientServiceFactory implem
synchronized (this) {
--serviceCounter;
- LOG.fine("Services still provided by this ServiceFactory: " + serviceCounter);
+ LOG.debug("Services still provided by this ServiceFactory: {}", serviceCounter);
if (serviceCounter <= 0 && closeable)
remove();
Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/EventAdminHelper.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/EventAdminHelper.java?rev=1408337&r1=1408336&r2=1408337&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/EventAdminHelper.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/EventAdminHelper.java Mon Nov 12 16:02:46 2012
@@ -21,9 +21,7 @@ package org.apache.cxf.dosgi.dsw.service
import java.util.Dictionary;
import java.util.Properties;
import java.util.logging.Level;
-import java.util.logging.Logger;
-import org.apache.cxf.common.logging.LogUtils;
import org.osgi.framework.BundleContext;
import org.osgi.framework.InvalidSyntaxException;
import org.osgi.framework.ServiceReference;
@@ -32,10 +30,12 @@ import org.osgi.service.event.Event;
import org.osgi.service.event.EventAdmin;
import org.osgi.service.remoteserviceadmin.EndpointDescription;
import org.osgi.service.remoteserviceadmin.RemoteServiceAdminEvent;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class EventAdminHelper {
- private final static Logger LOG = LogUtils.getL7dLogger(EventAdminHelper.class);
+ private final static Logger LOG = LoggerFactory.getLogger(EventAdminHelper.class);
private BundleContext bctx;
@@ -96,7 +96,7 @@ public class EventAdminHelper {
EventAdmin[] eas = getEventAdmins();
if (eas != null) {
- LOG.fine("Publishing event to "+eas.length+" EventAdmins; Topic:["+topic+"]");
+ LOG.debug("Publishing event to {} EventAdmins; Topic:[{}]", eas.length, topic);
for (EventAdmin eventAdmin : eas) {
eventAdmin.postEvent(ev);
}
@@ -115,7 +115,7 @@ public class EventAdminHelper {
try {
refs = bctx.getAllServiceReferences(EventAdmin.class.getName(), null);
} catch (InvalidSyntaxException e) {
- LOG.log(Level.SEVERE, "Failed to get EventAdmin: " + e.getMessage(), e);
+ LOG.error("Failed to get EventAdmin: " + e.getMessage(), e);
}
if (refs == null)
Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/EventProducer.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/EventProducer.java?rev=1408337&r1=1408336&r2=1408337&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/EventProducer.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/EventProducer.java Mon Nov 12 16:02:46 2012
@@ -20,9 +20,7 @@ package org.apache.cxf.dosgi.dsw.service
import java.util.List;
import java.util.logging.Level;
-import java.util.logging.Logger;
-import org.apache.cxf.common.logging.LogUtils;
import org.osgi.framework.BundleContext;
import org.osgi.framework.InvalidSyntaxException;
import org.osgi.framework.ServiceReference;
@@ -31,10 +29,12 @@ import org.osgi.service.remoteserviceadm
import org.osgi.service.remoteserviceadmin.ImportRegistration;
import org.osgi.service.remoteserviceadmin.RemoteServiceAdminEvent;
import org.osgi.service.remoteserviceadmin.RemoteServiceAdminListener;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class EventProducer {
- private final static Logger LOG = LogUtils.getL7dLogger(EventProducer.class);
+ private final static Logger LOG = LoggerFactory.getLogger(EventProducer.class);
private BundleContext bctx;
private EventAdminHelper eaHelper;
@@ -70,14 +70,15 @@ public class EventProducer {
if (listenerRefs != null) {
for (ServiceReference sref : listenerRefs) {
RemoteServiceAdminListener rsal = (RemoteServiceAdminListener)bctx.getService(sref);
- LOG.fine("notify RemoteServiceAdminListener " + rsal
- + " of bundle " + sref.getBundle().getSymbolicName());
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("notify RemoteServiceAdminListener {} of bundle {}" + rsal, sref.getBundle().getSymbolicName());
+ }
rsal.remoteAdminEvent(rsae);
}
}
} catch (InvalidSyntaxException e) {
- LOG.log(Level.SEVERE, e.getMessage(), e);
+ LOG.error(e.getMessage(), e);
}
}
Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ExportRegistrationImpl.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ExportRegistrationImpl.java?rev=1408337&r1=1408336&r2=1408337&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ExportRegistrationImpl.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ExportRegistrationImpl.java Mon Nov 12 16:02:46 2012
@@ -21,10 +21,7 @@ package org.apache.cxf.dosgi.dsw.service
import java.util.Arrays;
import java.util.Map;
import java.util.Set;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import org.apache.cxf.common.logging.LogUtils;
import org.apache.cxf.endpoint.Server;
import org.osgi.framework.BundleContext;
import org.osgi.framework.Constants;
@@ -36,10 +33,12 @@ import org.osgi.service.remoteserviceadm
import org.osgi.service.remoteserviceadmin.ExportRegistration;
import org.osgi.util.tracker.ServiceTracker;
import org.osgi.util.tracker.ServiceTrackerCustomizer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class ExportRegistrationImpl implements ExportRegistration {
- private static final Logger LOG = LogUtils.getL7dLogger(ExportRegistrationImpl.class);
+ private static final Logger LOG = LoggerFactory.getLogger(ExportRegistrationImpl.class);
private Server server;
private boolean closed = false;
@@ -94,7 +93,7 @@ public class ExportRegistrationImpl impl
// really close the ExReg
// TODO close it and remove from management structure .... !
- LOG.fine("really closing ExportRegistartion now! ");
+ LOG.debug("really closing ExportRegistartion now! ");
synchronized (this) {
if (server != null) {
@@ -173,10 +172,9 @@ public class ExportRegistrationImpl impl
Filter f;
final Long sid = (Long)getExportReference().getExportedService().getProperty(Constants.SERVICE_ID);
try {
- f = bctx.createFilter("("+Constants.SERVICE_ID+"="+sid+")");
+ f = bctx.createFilter("(" + Constants.SERVICE_ID + "=" + sid + ")");
} catch (InvalidSyntaxException e) {
- LOG.log(Level.FINE, e.getMessage(), e);
- LOG.warning("Service tracker could not be started. The service will not be automatically unexported.");
+ LOG.warn("Service tracker could not be started. The service will not be automatically unexported " + e.getMessage(), e);
return;
}
serviceTracker = new ServiceTracker(bctx, f, new ServiceTrackerCustomizer() {
@@ -188,7 +186,7 @@ public class ExportRegistrationImpl impl
public void modifiedService(ServiceReference sr, Object s) {
// FIXME:
- LOG.warning("Service modifications after the service is exported are currently not supported. The export is not modified!");
+ LOG.warn("Service modifications after the service is exported are currently not supported. The export is not modified!");
}
public Object addingService(ServiceReference sr) {
Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ImportRegistrationImpl.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ImportRegistrationImpl.java?rev=1408337&r1=1408336&r2=1408337&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ImportRegistrationImpl.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ImportRegistrationImpl.java Mon Nov 12 16:02:46 2012
@@ -20,19 +20,19 @@ package org.apache.cxf.dosgi.dsw.service
import java.util.ArrayList;
import java.util.List;
-import java.util.logging.Logger;
-import org.apache.cxf.common.logging.LogUtils;
import org.osgi.framework.ServiceReference;
import org.osgi.framework.ServiceRegistration;
import org.osgi.service.remoteserviceadmin.EndpointDescription;
import org.osgi.service.remoteserviceadmin.ImportReference;
import org.osgi.service.remoteserviceadmin.ImportRegistration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
// *************************** FIXME: some old methods might be in here ****
public class ImportRegistrationImpl implements ImportRegistration {
- private final static Logger LOG = LogUtils.getL7dLogger(ImportRegistrationImpl.class);
+ private final static Logger LOG = LoggerFactory.getLogger(ImportRegistrationImpl.class);
private Throwable exception;
private ServiceRegistration importedService;
@@ -85,7 +85,7 @@ public class ImportRegistrationImpl impl
}
public synchronized void close() {
- LOG.finest("close() called ");
+ LOG.debug("close() called ");
if (isFailure())
return;
@@ -107,7 +107,7 @@ public class ImportRegistrationImpl impl
if (childs.isEmpty() && !detatched && closed) {
detatched = true;
- LOG.fine("really closing ImportRegistartion now! ");
+ LOG.debug("really closing ImportRegistartion now! ");
if (clientServiceFactory != null)
clientServiceFactory.setCloseable(true);
Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceAdminCore.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceAdminCore.java?rev=1408337&r1=1408336&r2=1408337&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceAdminCore.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceAdminCore.java Mon Nov 12 16:02:46 2012
@@ -30,9 +30,7 @@ import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Properties;
-import java.util.logging.Logger;
-import org.apache.cxf.common.logging.LogUtils;
import org.apache.cxf.dosgi.dsw.Constants;
import org.apache.cxf.dosgi.dsw.handlers.ConfigTypeHandlerFactory;
import org.apache.cxf.dosgi.dsw.handlers.ConfigurationTypeHandler;
@@ -53,10 +51,12 @@ import org.osgi.service.remoteserviceadm
import org.osgi.service.remoteserviceadmin.ImportRegistration;
import org.osgi.service.remoteserviceadmin.RemoteConstants;
import org.osgi.service.remoteserviceadmin.RemoteServiceAdmin;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class RemoteServiceAdminCore implements RemoteServiceAdmin {
- private static final Logger LOG = LogUtils.getL7dLogger(RemoteServiceAdminCore.class);
+ private static final Logger LOG = LoggerFactory.getLogger(RemoteServiceAdminCore.class);
private final LinkedHashMap<ServiceReference, Collection<ExportRegistration>> exportedServices = new LinkedHashMap<ServiceReference, Collection<ExportRegistration>>();
private final LinkedHashMap<EndpointDescription, Collection<ImportRegistrationImpl>> importedServices = new LinkedHashMap<EndpointDescription, Collection<ImportRegistrationImpl>>();
@@ -91,12 +91,13 @@ public class RemoteServiceAdminCore impl
public List<ExportRegistration> exportService(ServiceReference serviceReference, Map additionalProperties)
throws IllegalArgumentException, UnsupportedOperationException {
- LOG.fine("RemoteServiceAdmin: exportService: " + serviceReference.getClass().getName());
+ String ifaceName = serviceReference.getClass().getName();
+ LOG.debug("RemoteServiceAdmin: exportService: {}", ifaceName);
synchronized (exportedServices) {
// check if it is already exported ....
if (exportedServices.containsKey(serviceReference)) {
- LOG.fine("already exported ... " + serviceReference.getClass().getName());
+ LOG.debug("already exported ... {} ", ifaceName);
Collection<ExportRegistration> regs = exportedServices.get(serviceReference);
List<EndpointDescription> copiedEndpoints = new ArrayList<EndpointDescription>();
@@ -122,7 +123,7 @@ public class RemoteServiceAdminCore impl
}
if (isCreatedByThisRSA(serviceReference)) {
- LOG.fine("proxy provided by this bundle ... " + serviceReference.getClass().getName());
+ LOG.debug("proxy provided by this bundle ... {} ", ifaceName);
// TODO: publish error event ? Not sure
return Collections.emptyList();
}
@@ -156,8 +157,7 @@ public class RemoteServiceAdminCore impl
}
if (unsupportedIntents.size() > 0) {
- LOG
- .severe("service cannot be exported because the following intents are not supported by this RSA: "
+ LOG.error("service cannot be exported because the following intents are not supported by this RSA: "
+ unsupportedIntents);
// TODO: publish error event
return Collections.emptyList();
@@ -173,8 +173,7 @@ public class RemoteServiceAdminCore impl
String[] allowedInterfaces = Utils.normalizeStringPlus(serviceProperties
.get(RemoteConstants.SERVICE_EXPORTED_INTERFACES));
if (providedInterfaces == null || allowedInterfaces == null) {
- LOG
- .severe("export failed: no provided service interfaces found or service_exported_interfaces is null !!");
+ LOG.error("export failed: no provided service interfaces found or service_exported_interfaces is null !!");
// TODO: publish error event ? not sure
return Collections.emptyList();
}
@@ -198,7 +197,7 @@ public class RemoteServiceAdminCore impl
// if no interface is to be exported return null
if (interfaces.size() == 0) {
- LOG.warning("no interfaces to be exported");
+ LOG.warn("no interfaces to be exported");
// TODO: publish error event ? not sure
return Collections.emptyList();
}
@@ -256,7 +255,7 @@ public class RemoteServiceAdminCore impl
exportRegistration.startServiceTracker(bctx);
exportRegs.put(iface, exportRegistration);
} catch (Exception e) {
- LOG.warning("server creation for interface " + iface + " failed!");
+ LOG.warn("server creation for interface {} failed!", iface);
EndpointDescription epd = new EndpointDescription(new HashMap<String, Object>());
ExportRegistrationImpl exportRegistration = new ExportRegistrationImpl(serviceReference, epd, this);
exportRegistration.setException(e);
@@ -349,11 +348,11 @@ public class RemoteServiceAdminCore impl
*/
public ImportRegistration importService(EndpointDescription endpoint) {
- LOG.fine("importService() Endpoint: " + endpoint.getProperties());
+ LOG.debug("importService() Endpoint: {}", endpoint.getProperties());
synchronized (importedServices) {
if (importedServices.containsKey(endpoint) && importedServices.get(endpoint).size() > 0) {
- LOG.fine("creating copy of existing import registrations");
+ LOG.debug("creating copy of existing import registrations");
Collection<ImportRegistrationImpl> imRegs = importedServices.get(endpoint);
ImportRegistrationImpl irParent = imRegs.iterator().next();
ImportRegistrationImpl ir = new ImportRegistrationImpl(irParent);
@@ -365,7 +364,7 @@ public class RemoteServiceAdminCore impl
List<String> remoteConfigurationTypes = endpoint.getConfigurationTypes();
if (remoteConfigurationTypes == null) {
- LOG.severe("the supplied endpoint has no configuration type");
+ LOG.error("the supplied endpoint has no configuration type");
return null;
}
@@ -377,7 +376,7 @@ public class RemoteServiceAdminCore impl
}
if (usableConfigurationTypes.size() == 0) {
- LOG.severe("the supplied endpoint has no compatible configuration type. Supported types are: "
+ LOG.error("the supplied endpoint has no compatible configuration type. Supported types are: "
+ supportedConfigurationTypes
+ " Types needed by the endpoint: "
+ remoteConfigurationTypes);
@@ -389,11 +388,11 @@ public class RemoteServiceAdminCore impl
emptyProps);
if (handler == null) {
- LOG.severe("no handler found");
+ LOG.error("no handler found");
return null;
}
- LOG.fine("Handler: " + handler);
+ LOG.debug("Handler: {}", handler);
// // TODO: somehow select the interfaces that should be imported ----> job of the TopologyManager
// ?
@@ -462,7 +461,10 @@ public class RemoteServiceAdminCore impl
+ interfaceName));
}
} catch (ClassNotFoundException ex) {
- LOG.warning("No class can be found for " + interfaceName);
+ if (LOG.isDebugEnabled()) {
+ // Only logging at debug level as this might be written to the log at the TopologyManager
+ LOG.debug("No class can be found for " + interfaceName, ex);
+ }
imReg.setException(ex);
}
}
@@ -479,7 +481,7 @@ public class RemoteServiceAdminCore impl
eventProducer.notifyRemoval(eri);
exRegs.remove(eri);
} else {
- LOG.severe("An exportRegistartion was intended to be removed form internal management structure but couldn't be found in it !! ");
+ LOG.error("An exportRegistartion was intended to be removed form internal management structure but couldn't be found in it !! ");
}
if (exRegs == null || exRegs.size() == 0) {
exportedServices.remove(sref);
@@ -509,14 +511,13 @@ public class RemoteServiceAdminCore impl
protected void removeImportRegistration(ImportRegistrationImpl iri) {
synchronized (importedServices) {
- LOG.finest("Removing importRegistration " + iri);
+ LOG.debug("Removing importRegistration {}", iri);
Collection<ImportRegistrationImpl> imRegs = importedServices.get(iri.getImportedEndpointAlways());
if (imRegs!=null && imRegs.contains(iri)) {
imRegs.remove(iri);
} else {
- LOG
- .severe("An importRegistartion was intended to be removed form internal management structure but couldn't be found in it !! ");
+ LOG.error("An importRegistartion was intended to be removed form internal management structure but couldn't be found in it !! ");
}
if (imRegs == null || imRegs.size() == 0) {
importedServices.remove(iri.getImportedEndpointAlways());
Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceadminFactory.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceadminFactory.java?rev=1408337&r1=1408336&r2=1408337&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceadminFactory.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceadminFactory.java Mon Nov 12 16:02:46 2012
@@ -20,19 +20,18 @@ package org.apache.cxf.dosgi.dsw.service
import java.util.ArrayList;
import java.util.List;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import org.apache.cxf.common.logging.LogUtils;
import org.apache.cxf.dosgi.dsw.qos.IntentMap;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceFactory;
import org.osgi.framework.ServiceRegistration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class RemoteServiceadminFactory implements ServiceFactory {
- private static final Logger LOG = LogUtils.getL7dLogger(RemoteServiceadminFactory.class);
+ private static final Logger LOG = LoggerFactory.getLogger(RemoteServiceadminFactory.class);
private List<RemoteServiceAdminInstance> rsaServiceInstances = new ArrayList<RemoteServiceAdminInstance>();
private RemoteServiceAdminCore rsaCore;
@@ -42,16 +41,14 @@ public class RemoteServiceadminFactory i
}
public Object getService(Bundle b, ServiceRegistration sr) {
- LOG.log(Level.FINEST, "new RemoteServiceAdmin ServiceInstance created for Bundle {0}",
- b.getSymbolicName());
+ LOG.debug("new RemoteServiceAdmin ServiceInstance created for Bundle {}", b.getSymbolicName());
RemoteServiceAdminInstance rsai = new RemoteServiceAdminInstance(b.getBundleContext(),rsaCore);
rsaServiceInstances.add(rsai);
return rsai;
}
public void ungetService(Bundle b, ServiceRegistration sr, Object serviceObject) {
- LOG.log(Level.FINEST, "RemoteServiceAdmin ServiceInstance removed for Bundle {0}",
- b.getSymbolicName());
+ LOG.debug("RemoteServiceAdmin ServiceInstance removed for Bundle {}", b.getSymbolicName());
if (serviceObject instanceof RemoteServiceAdminInstance) {
RemoteServiceAdminInstance rsai = (RemoteServiceAdminInstance)serviceObject;
rsai.close();
Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/util/ClassUtils.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/util/ClassUtils.java?rev=1408337&r1=1408336&r2=1408337&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/util/ClassUtils.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/util/ClassUtils.java Mon Nov 12 16:02:46 2012
@@ -23,14 +23,13 @@ import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import org.apache.cxf.common.logging.LogUtils;
import org.osgi.framework.BundleContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public final class ClassUtils {
- private static final Logger LOG = LogUtils.getL7dLogger(ClassUtils.class);
+ private static final Logger LOG = LoggerFactory.getLogger(ClassUtils.class);
private ClassUtils() {}
@@ -127,8 +126,7 @@ public final class ClassUtils {
providers.add(pClass.newInstance());
}
} catch (Exception ex) {
- LOG.log(Level.FINE, "Failed to load provider, org ex: " + ex.getMessage(), ex);
- LOG.warning("Provider " + className.trim() + " can not be loaded or created");
+ LOG.warn("Provider " + className.trim() + " can not be loaded or created " + ex.getMessage(), ex);
}
}
return providers;
Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/util/OsgiUtils.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/util/OsgiUtils.java?rev=1408337&r1=1408336&r2=1408337&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/util/OsgiUtils.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/util/OsgiUtils.java Mon Nov 12 16:02:46 2012
@@ -24,24 +24,22 @@ import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
-import java.util.Map.Entry;
import java.util.Properties;
import java.util.Set;
import java.util.UUID;
-import java.util.logging.Logger;
-import org.apache.cxf.common.logging.LogUtils;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
-import org.osgi.framework.Constants;
import org.osgi.framework.ServiceReference;
import org.osgi.service.packageadmin.ExportedPackage;
import org.osgi.service.packageadmin.PackageAdmin;
import org.osgi.service.remoteserviceadmin.EndpointDescription;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public final class OsgiUtils {
- public static final Logger LOG = LogUtils.getL7dLogger(OsgiUtils.class);
+ public static final Logger LOG = LoggerFactory.getLogger(OsgiUtils.class);
private OsgiUtils() {
}
@@ -115,25 +113,27 @@ public final class OsgiUtils {
+ ". Falling back to 0.0.0");
return "0.0.0";
}
- LOG.finest("Interface source bundle: " + b.getSymbolicName());
+ LOG.debug("Interface source bundle: {}", b.getSymbolicName());
ExportedPackage[] ep = pa.getExportedPackages(b);
- LOG.finest("Exported Packages of the source bundle: " + ep);
+ LOG.debug("Exported Packages of the source bundle: {}", ep);
String pack = iClass.getPackage().getName();
- LOG.finest("Looking for Package: " + pack);
+ LOG.debug("Looking for Package: {}", pack);
if (ep != null) {
for (ExportedPackage p : ep) {
if (p != null) {
if (pack.equals(p.getName())) {
- LOG.fine("found package -> Version: " + p.getVersion());
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("found package -> Version: {}", p.getVersion());
+ }
return p.getVersion().toString();
}
}
}
}
} else {
- LOG.severe("Was unable to obtain the package admin service -> can't resolve interface versions");
+ LOG.error("Was unable to obtain the package admin service -> can't resolve interface versions");
}
LOG.info("Unable to find interface version for interface " + iClass.getName()
@@ -179,7 +179,7 @@ public final class OsgiUtils {
}else if(keysLowerCase.containsKey(key)){
String origKey = keysLowerCase.get(key);
serviceProperties.put(origKey, e.getValue());
- LOG.fine("Overwriting property [" + origKey + "] with value [" + e.getValue() + "]");
+ LOG.debug("Overwriting property [{}] with value [{}]", origKey, e.getValue());
}else{
serviceProperties.put(e.getKey(), e.getValue());
keysLowerCase.put(e.getKey().toString().toLowerCase(), e.getKey().toString());
Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/util/Utils.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/util/Utils.java?rev=1408337&r1=1408336&r2=1408337&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/util/Utils.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/util/Utils.java Mon Nov 12 16:02:46 2012
@@ -21,13 +21,13 @@ package org.apache.cxf.dosgi.dsw.util;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
-import java.util.logging.Logger;
-import org.apache.cxf.common.logging.LogUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class Utils {
- private static final Logger LOG = LogUtils.getL7dLogger(Utils.class);
+ private static final Logger LOG = LoggerFactory.getLogger(Utils.class);
@SuppressWarnings("rawtypes")
public static String[] normalizeStringPlus(Object object) {
@@ -56,7 +56,7 @@ public class Utils {
String s = (String)o;
ar.add(s);
}else{
- LOG.warning("stringPlus contained non string element in list ! Element was skipped");
+ LOG.warn("stringPlus contained non string element in list ! Element was skipped");
}
}
return ar.toArray(new String[ar.size()]);