From a370d2bdc6135e81d784ed4d7d57a3233dbe5733 Mon Sep 17 00:00:00 2001 From: Martin Wittlinger Date: Sat, 10 Jun 2023 00:26:18 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=9A=91=EF=B8=8F=20Fix=20logging=20?= =?UTF-8?q?of=20errors?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../martinwitt/laughing_train/mining/PeriodicMiner.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/github-bot/src/main/java/io/github/martinwitt/laughing_train/mining/PeriodicMiner.java b/github-bot/src/main/java/io/github/martinwitt/laughing_train/mining/PeriodicMiner.java index 37ee13b20..fe935e2f1 100644 --- a/github-bot/src/main/java/io/github/martinwitt/laughing_train/mining/PeriodicMiner.java +++ b/github-bot/src/main/java/io/github/martinwitt/laughing_train/mining/PeriodicMiner.java @@ -104,19 +104,18 @@ private void mineRandomRepo() { addOrUpdateCommitHash(success); } if (spoonPatternAnalyzerResult instanceof SpoonPatternAnalyzerResult.Failure failure) { - logger.atWarning().log("Failed to analyze project with spoon %s", success.project()); + logger.atWarning().log("Failed to analyze project with spoon %s", failure.message()); registry.counter("mining.spoon.error").increment(); tryDeleteProject(success); } - if (qodanaResult instanceof QodanaResult.Failure) { - logger.atWarning().log("Failed to analyze project %s", success.project()); + if (qodanaResult instanceof QodanaResult.Failure failure) { + logger.atWarning().log("Failed to analyze project %s", failure.message()); registry.counter("mining.qodana.error").increment(); tryDeleteProject(success); return; } if (qodanaResult instanceof QodanaResult.Success successResult) { logger.atInfo().log("Successfully analyzed project %s", success.project()); - registry.counter("mining.qodana.success").increment(); saveQodanaResults(successResult); addOrUpdateCommitHash(success); }