From 85e53f4f902c672257c0f5bda344e36a7815d1b1 Mon Sep 17 00:00:00 2001 From: Boming Zhang Date: Thu, 5 Dec 2024 12:45:28 -0500 Subject: [PATCH] chore(healthcheck): better repo size log --- pkg/healthcheck/reposize.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/healthcheck/reposize.go b/pkg/healthcheck/reposize.go index 939adb8..dde0e4d 100644 --- a/pkg/healthcheck/reposize.go +++ b/pkg/healthcheck/reposize.go @@ -16,7 +16,7 @@ func RepoSize(confSize float64) error { cmd := exec.Command("git", "count-objects", "-v") output, err := cmd.CombinedOutput() if err != nil { - slog.Error("running git command:", "err", err) + slog.Error("running git command:", "err", err, "output", output) return fmt.Errorf("error running git command: %w", err) } lines := strings.Split(string(output), "\n") @@ -27,8 +27,8 @@ func RepoSize(confSize float64) error { sizeStr := fields[1] size, err := strconv.Atoi(sizeStr) if err != nil { - slog.Error("running git command:", "err", err) - return fmt.Errorf("error running git command: %w", err) + slog.Error("parsing repo size:", "err", err, "line", line) + return fmt.Errorf("error parsing repo size: %w", err) } sum += size }