1
0
mirror of https://github.com/getsops/sops.git synced 2026-02-05 12:45:21 +01:00

Default to Warn log level unless verbose flag is passed

This commit is contained in:
Adrian Utrilla
2018-03-07 17:18:45 +01:00
parent 8a0ce52f1b
commit 9d6a8d0e21
6 changed files with 35 additions and 19 deletions

View File

@@ -163,7 +163,7 @@ func (key *MasterKey) Encrypt(dataKey []byte) error {
log.WithField("fingerprint", key.Fingerprint).Info("Encryption succeeded")
return nil
}
log.WithField("fingerprint", key.Fingerprint).Warn("Encryption failed")
log.WithField("fingerprint", key.Fingerprint).Info("Encryption failed")
return fmt.Errorf(
`could not encrypt data key with PGP key: golang.org/x/crypto/openpgp error: %v; GPG binary error: %v`,
openpgpErr, binaryErr)
@@ -225,7 +225,7 @@ func (key *MasterKey) Decrypt() ([]byte, error) {
log.WithField("fingerprint", key.Fingerprint).Info("Decryption succeeded")
return dataKey, nil
}
log.WithField("fingerprint", key.Fingerprint).Warn("Decryption failed")
log.WithField("fingerprint", key.Fingerprint).Info("Decryption failed")
return nil, fmt.Errorf(
`could not decrypt data key with PGP key: golang.org/x/crypto/openpgp error: %v; GPG binary error: %v`,
openpgpErr, binaryErr)