From b986fa49d895cfa5eaea9f4e22205a23b644f563 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Mon, 21 Feb 2022 19:07:20 +0100 Subject: [PATCH] Worker: clean up some logging --- internal/worker/config.go | 7 +++---- internal/worker/registration.go | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/internal/worker/config.go b/internal/worker/config.go index 8ed40d29..d5158441 100644 --- a/internal/worker/config.go +++ b/internal/worker/config.go @@ -87,16 +87,15 @@ func loadConfig(configWrangler FileConfigWrangler) (WorkerConfig, error) { } func loadCredentials(configWrangler FileConfigWrangler) (WorkerCredentials, error) { - logger := log.With().Str("filename", configFilename).Logger() - logger.Info().Msg("loading credentials") - var creds WorkerCredentials - err := configWrangler.LoadConfig(credentialsFilename, &creds) if err != nil { return WorkerCredentials{}, err } + log.Info(). + Str("filename", credentialsFilename). + Msg("loaded credentials") return creds, nil } diff --git a/internal/worker/registration.go b/internal/worker/registration.go index f795cc1a..b39a662e 100644 --- a/internal/worker/registration.go +++ b/internal/worker/registration.go @@ -179,7 +179,7 @@ func signOn(ctx context.Context, cfg WorkerConfig, client api.ClientWithResponse } switch { case resp.JSON200 != nil: - log.Info(). + log.Debug(). Int("code", resp.StatusCode()). Interface("resp", resp.JSON200). Msg("signed on at Manager")