From b16bd485cf08c449770b5790ea0e4987b6e26bbd Mon Sep 17 00:00:00 2001 From: Kjeld Schouten Date: Sat, 26 Oct 2024 14:40:42 +0200 Subject: [PATCH] fisx(clustertool): signficantly redice verbosity on encryption/decryption/check code. --- clustertool/pkg/sops/decrypt.go | 4 ++-- clustertool/pkg/sops/loadsops.go | 2 +- clustertool/pkg/sops/wrapper.go | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/clustertool/pkg/sops/decrypt.go b/clustertool/pkg/sops/decrypt.go index 31e8ac9c2c65..bc721162f25b 100644 --- a/clustertool/pkg/sops/decrypt.go +++ b/clustertool/pkg/sops/decrypt.go @@ -56,7 +56,7 @@ func DecryptFiles() error { log.Error().Err(err).Msgf("Error writing decrypted data to file %s", file.Path) return fmt.Errorf("error writing decrypted data to file %s: %v", file.Path, err) } - log.Info().Msgf("Successfully decrypted file: %s", file.Path) + log.Debug().Msgf("Successfully decrypted file: %s", file.Path) } } @@ -66,7 +66,7 @@ func DecryptFiles() error { } initfiles.LoadTalEnv(true) - log.Trace().Msg("Finished DecryptFiles function") + log.Info().Msg("All files decrypted successfully") return nil } diff --git a/clustertool/pkg/sops/loadsops.go b/clustertool/pkg/sops/loadsops.go index f43ac1e28f21..77a7565b329a 100644 --- a/clustertool/pkg/sops/loadsops.go +++ b/clustertool/pkg/sops/loadsops.go @@ -37,7 +37,7 @@ func LoadSopsConfig() (SopsConfig, error) { log.Debug().Msg("Successfully unmarshaled YAML data into struct") // Log the loaded struct - log.Info().Msg("Loaded SopsConfig successfully") + log.Debug().Msg("Loaded SopsConfig successfully") log.Debug().Interface("loaded SOPS Config", config) return config, nil diff --git a/clustertool/pkg/sops/wrapper.go b/clustertool/pkg/sops/wrapper.go index 7c67bfbd20d4..10c3747700d2 100644 --- a/clustertool/pkg/sops/wrapper.go +++ b/clustertool/pkg/sops/wrapper.go @@ -73,7 +73,7 @@ func EncryptWithAgeKey(body []byte, regex string, format string) ([]byte, error) return nil, fmt.Errorf("error encrypting data: %v", err) } - log.Info().Msg("Data encrypted successfully") + log.Debug().Msg("Data encrypted successfully") return encryptedData, nil } @@ -186,6 +186,6 @@ func (m *cypher) Encrypt(content []byte, encrConfig EncryptionConfig) (result [] return nil, err } - log.Info().Msg("Tree encrypted successfully") + log.Debug().Msg("Tree encrypted successfully") return store.EmitEncryptedFile(tree) }