From 1ee6277d6451bfc94a0e888b493cf011dda20b6a Mon Sep 17 00:00:00 2001 From: Eli Bishop Date: Tue, 21 Apr 2020 15:57:12 -0700 Subject: [PATCH] don't log exception stacktraces except at debug level --- .../java/com/launchdarkly/client/DefaultEventProcessor.java | 3 ++- src/main/java/com/launchdarkly/client/LDClient.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/launchdarkly/client/DefaultEventProcessor.java b/src/main/java/com/launchdarkly/client/DefaultEventProcessor.java index 0efa8e46e..a82890e78 100644 --- a/src/main/java/com/launchdarkly/client/DefaultEventProcessor.java +++ b/src/main/java/com/launchdarkly/client/DefaultEventProcessor.java @@ -530,7 +530,8 @@ private static void postJson(OkHttpClient httpClient, Headers headers, String js } break; } catch (IOException e) { - logger.warn("Unhandled exception in LaunchDarkly client when posting events to URL: " + request.url(), e); + logger.warn("Unhandled exception in LaunchDarkly client when posting events to URL: {} ({})", request.url(), e.toString()); + logger.debug(e.toString(), e); continue; } } diff --git a/src/main/java/com/launchdarkly/client/LDClient.java b/src/main/java/com/launchdarkly/client/LDClient.java index 058513cd8..cfe55e61d 100644 --- a/src/main/java/com/launchdarkly/client/LDClient.java +++ b/src/main/java/com/launchdarkly/client/LDClient.java @@ -473,7 +473,8 @@ private static String getClientVersion() { String value = attr.getValue("Implementation-Version"); return value; } catch (IOException e) { - logger.warn("Unable to determine LaunchDarkly client library version", e); + logger.warn("Unable to determine LaunchDarkly client library version: {}", e.toString()); + logger.debug(e.toString(), e); return "Unknown"; } }