adjusted legal info, add logging
diff --git a/org.eclipse.osbp.xtext.functionlibrary.common.feature/feature.xml b/org.eclipse.osbp.xtext.functionlibrary.common.feature/feature.xml index 600eeb6..04f243a 100644 --- a/org.eclipse.osbp.xtext.functionlibrary.common.feature/feature.xml +++ b/org.eclipse.osbp.xtext.functionlibrary.common.feature/feature.xml
@@ -15,7 +15,7 @@ label="%featureName" version="0.9.0.qualifier" provider-name="%providerName" - plugin="org.eclipse.osbp.xtext.functionlibrary.common"> + plugin="org.eclipse.osbp.license"> <description> %description
diff --git a/org.eclipse.osbp.xtext.functionlibrary.common/src/org/eclipse/osbp/xtext/functionlibrary/common/http/HttpClient.java b/org.eclipse.osbp.xtext.functionlibrary.common/src/org/eclipse/osbp/xtext/functionlibrary/common/http/HttpClient.java index 1aeff84..44be983 100644 --- a/org.eclipse.osbp.xtext.functionlibrary.common/src/org/eclipse/osbp/xtext/functionlibrary/common/http/HttpClient.java +++ b/org.eclipse.osbp.xtext.functionlibrary.common/src/org/eclipse/osbp/xtext/functionlibrary/common/http/HttpClient.java
@@ -55,13 +55,16 @@ HttpGet get = new HttpGet(builder.build()); get.addHeader(ACCEPT, APPLICATION_JSON); CloseableHttpClient httpClient = HttpClientBuilder.create().build(); + if(LOGGER.isDebugEnabled()) LOGGER.debug("http-get: {}:{} {}",remoteHost, remotePort, get.toString()); CloseableHttpResponse response = httpClient.execute(get); responseString = EntityUtils.toString(response.getEntity()); + if(LOGGER.isDebugEnabled()) LOGGER.debug("http-get-response: {}",responseString); // in case a python strings are returned - change to normal quotes if(StringUtils.countMatches(responseString, "'") %2 == 0) { responseString = responseString.replace("'", "\""); } get.releaseConnection(); + if(LOGGER.isDebugEnabled()) LOGGER.debug("http-get-response(modified): {}",responseString); } catch (URISyntaxException | ParseException | IOException e) { LOGGER.error("{}", e); } @@ -97,10 +100,11 @@ try { HttpPut put = new HttpPut(builder.build()); put.addHeader(ACCEPT, APPLICATION_JSON); + if(LOGGER.isDebugEnabled()) LOGGER.debug("http-put: {}:{} {}",remoteHost, remotePort, put.toString()); CloseableHttpClient httpClient = HttpClientBuilder.create().build(); CloseableHttpResponse response = httpClient.execute(put); if(LOGGER.isDebugEnabled()) { - LOGGER.debug(EntityUtils.toString(response.getEntity())); + LOGGER.debug("http-put-response: {}",EntityUtils.toString(response.getEntity())); } put.releaseConnection(); } catch (URISyntaxException | ParseException | IOException e) { @@ -134,9 +138,10 @@ post.setEntity(mpeBuilder.build()); } CloseableHttpClient httpClient = HttpClientBuilder.create().build(); + if(LOGGER.isDebugEnabled()) LOGGER.debug("http-post: {}:{} {}",remoteHost, remotePort, post.toString()); CloseableHttpResponse response = httpClient.execute(post); if(LOGGER.isDebugEnabled()) { - LOGGER.debug(EntityUtils.toString(response.getEntity())); + LOGGER.debug("http-post-response: {}",EntityUtils.toString(response.getEntity())); } post.releaseConnection(); } catch (URISyntaxException | ParseException | IOException e) {