From 3b3b95a5ba7dfd7822a08d6128945ee3cb44733f Mon Sep 17 00:00:00 2001 From: Martin Wittlinger Date: Tue, 18 Jul 2023 21:41:02 +0200 Subject: [PATCH] fix(spoon): Improve logging of spoon analyzer with too large stacktraces (#865) --- .../laughing_train/services/SpoonAnalyzerService.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/github-bot/src/main/java/io/github/martinwitt/laughing_train/services/SpoonAnalyzerService.java b/github-bot/src/main/java/io/github/martinwitt/laughing_train/services/SpoonAnalyzerService.java index d356c4f01..9a0c3e4b2 100644 --- a/github-bot/src/main/java/io/github/martinwitt/laughing_train/services/SpoonAnalyzerService.java +++ b/github-bot/src/main/java/io/github/martinwitt/laughing_train/services/SpoonAnalyzerService.java @@ -2,7 +2,6 @@ import com.google.common.base.Strings; import com.google.common.flogger.FluentLogger; -import com.google.common.flogger.StackSize; import io.github.martinwitt.laughing_train.data.request.AnalyzerRequest; import io.github.martinwitt.laughing_train.data.result.CodeAnalyzerResult; import io.github.martinwitt.laughing_train.domain.entity.AnalyzerResult; @@ -47,7 +46,7 @@ public CodeAnalyzerResult analyze(AnalyzerRequest request) { return new CodeAnalyzerResult.Failure("Unknown request type"); } } catch (Throwable e) { - logger.atSevere().withStackTrace(StackSize.SMALL).withCause(e).log("Error while analyzing code"); + logger.atSevere().log("Error while analyzing code analyzer %s", e.getMessage()); return new CodeAnalyzerResult.Failure(Strings.nullToEmpty(e.getMessage())); } }