aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBogumil Zebek <bogumil.zebek@nokia.com>2020-04-23 06:58:27 +0000
committerGerrit Code Review <gerrit@onap.org>2020-04-23 06:58:27 +0000
commite0e1d7c12e1e04aa46d007b8708b9afdde491e3f (patch)
treefea0f407a65786df61d234cc4411998a86d6e8d9
parent5ee0faf334614d393cc419c84947aa1d4f1f3a67 (diff)
parent40da104bc021e0e4aab58f7c33c766afa1535b70 (diff)
Merge "Add string formatter to error message"
-rw-r--r--pnfsimulator/src/main/java/org/onap/pnfsimulator/simulator/client/utils/ssl/SslSupportLevel.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/pnfsimulator/src/main/java/org/onap/pnfsimulator/simulator/client/utils/ssl/SslSupportLevel.java b/pnfsimulator/src/main/java/org/onap/pnfsimulator/simulator/client/utils/ssl/SslSupportLevel.java
index 2325ebc..fb3b958 100644
--- a/pnfsimulator/src/main/java/org/onap/pnfsimulator/simulator/client/utils/ssl/SslSupportLevel.java
+++ b/pnfsimulator/src/main/java/org/onap/pnfsimulator/simulator/client/utils/ssl/SslSupportLevel.java
@@ -68,7 +68,15 @@ public enum SslSupportLevel {
.build();
} catch (GeneralSecurityException e) {
- LOGGER.error("Could not initialize client due to SSL exception: {}. Default client without SSL support will be used instead.\nCause: {}", e.getMessage(), e.getCause());
+ String errorMessage =
+ String.format(
+ "Could not initialize client due to SSL exception: %s. " +
+ "Default client without SSL support will be used instead." +
+ "\nCause: %s",
+ e.getMessage(),
+ e.getCause()
+ );
+ LOGGER.error(errorMessage, e);
client = NONE.getClient(requestConfig, sslAuthenticationHelper);
}
return client;