diff options
author | Tomasz Wrobel <tomasz.wrobel@nokia.com> | 2020-03-03 14:27:07 +0100 |
---|---|---|
committer | Tomasz Wrobel <tomasz.wrobel@nokia.com> | 2020-03-03 14:27:07 +0100 |
commit | 552f87238fbc04b63a992645217dcfded40cb122 (patch) | |
tree | 63bbd1b0c8a8cd0f9e657b4eaf4bfde24408318f /certServiceClient/src | |
parent | b6b482e71132f0fdf478326e26756aa119749858 (diff) |
Refactor logger message
Issue-ID: AAF-996
Signed-off-by: Tomasz Wrobel <tomasz.wrobel@nokia.com>
Change-Id: Ifc3ff60b8b5da15bdc904a80b6e80195b7bca0ce
Diffstat (limited to 'certServiceClient/src')
-rw-r--r-- | certServiceClient/src/main/java/org/onap/aaf/certservice/client/httpclient/HttpClient.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/certServiceClient/src/main/java/org/onap/aaf/certservice/client/httpclient/HttpClient.java b/certServiceClient/src/main/java/org/onap/aaf/certservice/client/httpclient/HttpClient.java index abf3cb1d..30f881bb 100644 --- a/certServiceClient/src/main/java/org/onap/aaf/certservice/client/httpclient/HttpClient.java +++ b/certServiceClient/src/main/java/org/onap/aaf/certservice/client/httpclient/HttpClient.java @@ -57,14 +57,14 @@ public class HttpClient { throws CertServiceApiResponseException, HttpClientException { try (CloseableHttpClient httpClient = httpClientProvider.getClient()) { - LOGGER.info(String.format("Sending request to API. Url: %s ", certServiceAddress + caName)); + LOGGER.info("Sending request to API. Url: {}{} ", certServiceAddress, caName); HttpResponse httpResponse = httpClient.execute(createHttpRequest(caName, csr, encodedPk)); LOGGER.info("Received response from API"); return extractCertServiceResponse(httpResponse); } catch (IOException e) { - LOGGER.error(String.format("Failed execute request to API for URL: '%s' . Exception message: '%s'", - certServiceAddress + caName, e.getMessage())); + LOGGER.error("Failed execute request to API for URL: {}{} . Exception message: {}", + certServiceAddress, caName, e.getMessage()); throw new HttpClientException(e); } } @@ -77,7 +77,7 @@ public class HttpClient { throws CertServiceApiResponseException, HttpClientException { int httpResponseCode = getStatusCode(httpResponse); if (HttpStatus.SC_OK != httpResponseCode) { - LOGGER.error(String.format("Error on API response. Response Code: %d", httpResponseCode)); + LOGGER.error("Error on API response. Response Code: {}", httpResponseCode); throw generateApiResponseException(httpResponse); } String jsonResponse = getStringResponse(httpResponse.getEntity()); |