From a9708ea2a1e5aaeae3c43d50bd66ee1290d6be6f Mon Sep 17 00:00:00 2001 From: Bruce Bujon Date: Tue, 3 Dec 2024 10:33:26 +0100 Subject: [PATCH] fix(crash-tracking): Remove exception logging (#8045) Only log exception in debug mode Decrease the log level --- .../crashtracking/OOMENotifierScriptInitializer.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dd-java-agent/agent-crashtracking/src/main/java/com/datadog/crashtracking/OOMENotifierScriptInitializer.java b/dd-java-agent/agent-crashtracking/src/main/java/com/datadog/crashtracking/OOMENotifierScriptInitializer.java index d8e63fe9702..c395c8cb40a 100644 --- a/dd-java-agent/agent-crashtracking/src/main/java/com/datadog/crashtracking/OOMENotifierScriptInitializer.java +++ b/dd-java-agent/agent-crashtracking/src/main/java/com/datadog/crashtracking/OOMENotifierScriptInitializer.java @@ -124,7 +124,11 @@ static void run(Path dir) { Files.walkFileTree(dir, new ScriptCleanupVisitor()); } } catch (IOException e) { - LOG.warn("Failed cleaning up process specific files in {}", dir, e); + if (LOG.isDebugEnabled()) { + LOG.info("Failed cleaning up process specific files in {}", dir, e); + } else { + LOG.info("Failed cleaning up process specific files in {}: {}", dir, e.toString()); + } } }