From 8c32045c4ecc3da8d17be1f9ed9958568adec50c Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Tue, 11 Aug 2020 16:46:09 +0530 Subject: [PATCH] util: use ErrorLog for context based logging use ErrorLog for context based logging for more detailed logging. Signed-off-by: Madhu Rajanna --- internal/util/cephcmds.go | 4 ++-- internal/util/crypto.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/util/cephcmds.go b/internal/util/cephcmds.go index 87cd9de3a..adc95ffb7 100644 --- a/internal/util/cephcmds.go +++ b/internal/util/cephcmds.go @@ -146,7 +146,7 @@ func CreateObject(ctx context.Context, monitors string, cr *Credentials, poolNam if errors.Is(err, rados.ErrObjectExists) { return JoinErrors(ErrObjectExists, err) } else if err != nil { - ErrorLogMsg(Log(ctx, "failed creating omap (%s) in pool (%s): (%v)"), objectName, poolName, err) + ErrorLog(ctx, "failed creating omap (%s) in pool (%s): (%v)", objectName, poolName, err) return err } @@ -180,7 +180,7 @@ func RemoveObject(ctx context.Context, monitors string, cr *Credentials, poolNam if errors.Is(err, rados.ErrNotFound) { return JoinErrors(ErrObjectNotFound, err) } else if err != nil { - ErrorLogMsg(Log(ctx, "failed removing omap (%s) in pool (%s): (%v)"), oMapName, poolName, err) + ErrorLog(ctx, "failed removing omap (%s) in pool (%s): (%v)", oMapName, poolName, err) return err } diff --git a/internal/util/crypto.go b/internal/util/crypto.go index 39323143c..1989e7165 100644 --- a/internal/util/crypto.go +++ b/internal/util/crypto.go @@ -158,7 +158,7 @@ func GetCryptoPassphrase(ctx context.Context, volumeID string, kms EncryptionKMS } return passphrase, nil } - ErrorLogMsg(Log(ctx, "failed to get encryption passphrase for %s: %s"), volumeID, err) + ErrorLog(ctx, "failed to get encryption passphrase for %s: %s", volumeID, err) return "", err }