Worker: clean up some logging

This commit is contained in:
Sybren A. Stüvel 2022-02-21 19:07:20 +01:00
parent b1b73de4ee
commit b986fa49d8
2 changed files with 4 additions and 5 deletions

View File

@ -87,16 +87,15 @@ func loadConfig(configWrangler FileConfigWrangler) (WorkerConfig, error) {
} }
func loadCredentials(configWrangler FileConfigWrangler) (WorkerCredentials, error) { func loadCredentials(configWrangler FileConfigWrangler) (WorkerCredentials, error) {
logger := log.With().Str("filename", configFilename).Logger()
logger.Info().Msg("loading credentials")
var creds WorkerCredentials var creds WorkerCredentials
err := configWrangler.LoadConfig(credentialsFilename, &creds) err := configWrangler.LoadConfig(credentialsFilename, &creds)
if err != nil { if err != nil {
return WorkerCredentials{}, err return WorkerCredentials{}, err
} }
log.Info().
Str("filename", credentialsFilename).
Msg("loaded credentials")
return creds, nil return creds, nil
} }

View File

@ -179,7 +179,7 @@ func signOn(ctx context.Context, cfg WorkerConfig, client api.ClientWithResponse
} }
switch { switch {
case resp.JSON200 != nil: case resp.JSON200 != nil:
log.Info(). log.Debug().
Int("code", resp.StatusCode()). Int("code", resp.StatusCode()).
Interface("resp", resp.JSON200). Interface("resp", resp.JSON200).
Msg("signed on at Manager") Msg("signed on at Manager")