diff options
3 files changed, 38 insertions, 33 deletions
diff --git a/openstack-client-connectors/http-connector/pom.xml b/openstack-client-connectors/http-connector/pom.xml index 6481b2e..c62be3a 100644 --- a/openstack-client-connectors/http-connector/pom.xml +++ b/openstack-client-connectors/http-connector/pom.xml @@ -1,30 +1,34 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.onap.so.libs.openstack-java-sdk</groupId> - <artifactId>client-connectors</artifactId> - <version>1.4.0-SNAPSHOT</version> - </parent> - - <groupId>org.onap.so.libs.openstack-java-sdk.client-connectors</groupId> - <artifactId>http-connector</artifactId> - <name>OpenStack HTTP-Client Connector</name> - <description>OpenStack HTTP-Client Connector</description> - <dependencies> - <dependency> - <groupId>org.apache.httpcomponents</groupId> - <artifactId>httpclient</artifactId> - </dependency> - <!-- bwj: added httpcore --> - <dependency> - <groupId>org.apache.httpcomponents</groupId> - <artifactId>httpcore</artifactId> - </dependency> - <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - <version>1.2.17</version> - </dependency> - </dependencies> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.onap.so.libs.openstack-java-sdk</groupId> + <artifactId>client-connectors</artifactId> + <version>1.4.0-SNAPSHOT</version> + </parent> + <groupId>org.onap.so.libs.openstack-java-sdk.client-connectors</groupId> + <artifactId>http-connector</artifactId> + <name>OpenStack HTTP-Client Connector</name> + <description>OpenStack HTTP-Client Connector</description> + <dependencies> + <dependency> + <groupId>org.apache.httpcomponents</groupId> + <artifactId>httpclient</artifactId> + </dependency> + <dependency> + <groupId>org.apache.httpcomponents</groupId> + <artifactId>httpcore</artifactId> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <version>1.7.25</version> + </dependency> + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-classic</artifactId> + <version>1.2.3</version> + </dependency> + </dependencies> </project> diff --git a/openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientConnector.java b/openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientConnector.java index 85ac96c..5a78b30 100644 --- a/openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientConnector.java +++ b/openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientConnector.java @@ -46,7 +46,8 @@ import org.apache.http.entity.ContentType; import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonRootName; @@ -65,7 +66,7 @@ public class HttpClientConnector implements OpenStackClientConnector { public static ObjectMapper DEFAULT_MAPPER; public static ObjectMapper WRAPPED_MAPPER; - private static Logger LOGGER = Logger.getLogger(HttpClientConnector.class); + private static Logger LOGGER = LoggerFactory.getLogger(HttpClientConnector.class); static { DEFAULT_MAPPER = new ObjectMapper(); @@ -123,7 +124,6 @@ public class HttpClientConnector implements OpenStackClientConnector { String entityJson = mapper.writeValueAsString (request.entity().getEntity()); entity = new StringEntity(entityJson, ContentType.create(request.entity().getContentType())); - LOGGER.debug("Openstack query JSON:"+entityJson); LOGGER.debug ("Request JSON Body: " + entityJson.replaceAll("\"password\":\"[^\"]*\"", "\"password\":\"***\"")); } catch (JsonProcessingException e) { diff --git a/openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientResponse.java b/openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientResponse.java index 711d4e5..41466a6 100644 --- a/openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientResponse.java +++ b/openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientResponse.java @@ -41,7 +41,8 @@ package com.woorea.openstack.connector; import org.apache.http.Header; import org.apache.http.HttpResponse; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import com.fasterxml.jackson.databind.ObjectMapper; import com.woorea.openstack.base.client.OpenStackResponse; @@ -55,7 +56,7 @@ import java.util.Map; public class HttpClientResponse implements OpenStackResponse { - private static Logger LOGGER = Logger.getLogger(HttpClientConnector.class); + private static Logger LOGGER = LoggerFactory.getLogger(HttpClientConnector.class); private HttpResponse response = null; private String entityBody = null; |