From bc2f554299643fc978061d384431dc9c4089afd2 Mon Sep 17 00:00:00 2001 From: Dmitry Kisler Date: Tue, 28 Nov 2023 22:21:11 +0100 Subject: [PATCH] Turn off logs below WARN level Signed-off-by: Dmitry Kisler --- src/cmd/bump-versions/main.go | 2 +- src/internal/github/client.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cmd/bump-versions/main.go b/src/cmd/bump-versions/main.go index 318a7ba982..4f940e3cbf 100644 --- a/src/cmd/bump-versions/main.go +++ b/src/cmd/bump-versions/main.go @@ -12,7 +12,7 @@ import ( ) func main() { - logger := slog.New(slog.NewJSONHandler(os.Stdout, nil)) + logger := slog.New(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{Level: slog.LevelWarn})) logger.Info("Starting version bump process for modules and providers") moduleDataDir := flag.String("module-data", "../modules", "Directory containing the module data") diff --git a/src/internal/github/client.go b/src/internal/github/client.go index 0fba7dc86d..11efd34ad0 100644 --- a/src/internal/github/client.go +++ b/src/internal/github/client.go @@ -45,6 +45,8 @@ func NewClient(ctx context.Context, log *slog.Logger, token string) Client { retryClient.HTTPClient = httpClient retryClient.RetryMax = 10 + retryClient.Logger = log.WithGroup("retryClient") + return Client{ ctx: ctx, log: log.WithGroup("github"),