Skip to content

Commit

Permalink
fix(spoon): Improve logging of spoon analyzer with too large stacktra…
Browse files Browse the repository at this point in the history
…ces (#865)
  • Loading branch information
MartinWitt authored Jul 18, 2023
1 parent 4cdee5d commit 3b3b95a
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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()));
}
}
Expand Down

0 comments on commit 3b3b95a

Please sign in to comment.