From d6c622ba84f03e7256f8ddd735b85d2f5d0e4ed8 Mon Sep 17 00:00:00 2001 From: Allen Benz Date: Sat, 10 Apr 2021 12:30:46 -0700 Subject: [PATCH] Better logging for get/setCauses exception --- .../java/com/sonyericsson/jenkins/plugins/bfa/PluginImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/sonyericsson/jenkins/plugins/bfa/PluginImpl.java b/src/main/java/com/sonyericsson/jenkins/plugins/bfa/PluginImpl.java index 77f469eb..348f05c7 100644 --- a/src/main/java/com/sonyericsson/jenkins/plugins/bfa/PluginImpl.java +++ b/src/main/java/com/sonyericsson/jenkins/plugins/bfa/PluginImpl.java @@ -661,7 +661,7 @@ public void setCauses(List causes) { try { knowledgeBase.saveCause(cause); } catch (Exception e) { - logger.log(Level.WARNING, null, e); + logger.log(Level.WARNING, "Failed to save cause to the knowledge base", e); } } } @@ -681,6 +681,7 @@ public Collection getCauses() { try { return knowledgeBase.getCauses(); } catch (Exception e) { + logger.log(Level.WARNING, "Failed to get causes from the knowledge base", e); return null; } }