From bab3f0429c64c81deaede3ecc3e7e18bae27f05c Mon Sep 17 00:00:00 2001 From: Ahrav Dutta Date: Mon, 22 Jan 2024 19:29:34 -0800 Subject: [PATCH] add more kvp pairs to error --- pkg/gitparse/gitparse.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkg/gitparse/gitparse.go b/pkg/gitparse/gitparse.go index aaa13c43587f..9380fc874577 100644 --- a/pkg/gitparse/gitparse.go +++ b/pkg/gitparse/gitparse.go @@ -363,7 +363,14 @@ func (c *Parser) FromReader(ctx context.Context, stdOut io.Reader, commitChan ch // If there is a currentCommit, send it to the channel. if currentCommit != nil { if err := currentDiff.finalize(); err != nil { - ctx.Logger().Error(err, "failed to finalize diff") + ctx.Logger().Error( + err, + "failed to finalize diff", + "commit", currentCommit.Hash, + "diff", currentDiff.PathB, + "size", currentDiff.Len(), + "latest_state", latestState.String(), + ) } commitChan <- *currentCommit totalLogSize += currentCommit.Size