diff --git a/.changes/next-release/bugfix-AWSSDKforJavav2-1054797.json b/.changes/next-release/bugfix-AWSSDKforJavav2-1054797.json new file mode 100644 index 000000000000..e93b4e453c9e --- /dev/null +++ b/.changes/next-release/bugfix-AWSSDKforJavav2-1054797.json @@ -0,0 +1,6 @@ +{ + "type": "bugfix", + "category": "AWS SDK for Java v2", + "contributor": "", + "description": "Changed the log level from error to warning when exceptions are found in parsing proxy configuration from system properties/environment variables, as we ignore those exceptions and proceed." +} diff --git a/utils/src/main/java/software/amazon/awssdk/utils/internal/proxy/ProxyEnvironmentVariableConfigProvider.java b/utils/src/main/java/software/amazon/awssdk/utils/internal/proxy/ProxyEnvironmentVariableConfigProvider.java index f2f4222967a4..084b08f1ef02 100644 --- a/utils/src/main/java/software/amazon/awssdk/utils/internal/proxy/ProxyEnvironmentVariableConfigProvider.java +++ b/utils/src/main/java/software/amazon/awssdk/utils/internal/proxy/ProxyEnvironmentVariableConfigProvider.java @@ -57,7 +57,7 @@ private Optional silentlyGetUrl() { try { return Optional.of(new URL(stringUrl)); } catch (MalformedURLException e) { - log.error(() -> "Malformed proxy config environment variable " + stringUrl, e); + log.warn(() -> "Malformed proxy config environment variable.", e); } } return Optional.empty(); diff --git a/utils/src/main/java/software/amazon/awssdk/utils/internal/proxy/ProxySystemPropertyConfigProvider.java b/utils/src/main/java/software/amazon/awssdk/utils/internal/proxy/ProxySystemPropertyConfigProvider.java index 0c38a25d2a2a..0cdb8ad922df 100644 --- a/utils/src/main/java/software/amazon/awssdk/utils/internal/proxy/ProxySystemPropertyConfigProvider.java +++ b/utils/src/main/java/software/amazon/awssdk/utils/internal/proxy/ProxySystemPropertyConfigProvider.java @@ -46,7 +46,7 @@ private static Integer safelyParseInt(String string) { try { return Integer.parseInt(string); } catch (Exception e) { - log.error(() -> "Failed to parse string" + string, e); + log.warn(() -> "Failed to parse string.", e); } return null; }