mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-17 20:00:23 +00:00
util: use ErrorLog for context based logging
use ErrorLog for context based logging for more detailed logging. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
7c24f4d597
commit
8c32045c4e
@ -146,7 +146,7 @@ func CreateObject(ctx context.Context, monitors string, cr *Credentials, poolNam
|
|||||||
if errors.Is(err, rados.ErrObjectExists) {
|
if errors.Is(err, rados.ErrObjectExists) {
|
||||||
return JoinErrors(ErrObjectExists, err)
|
return JoinErrors(ErrObjectExists, err)
|
||||||
} else if err != nil {
|
} 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
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -180,7 +180,7 @@ func RemoveObject(ctx context.Context, monitors string, cr *Credentials, poolNam
|
|||||||
if errors.Is(err, rados.ErrNotFound) {
|
if errors.Is(err, rados.ErrNotFound) {
|
||||||
return JoinErrors(ErrObjectNotFound, err)
|
return JoinErrors(ErrObjectNotFound, err)
|
||||||
} else if err != nil {
|
} 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
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -158,7 +158,7 @@ func GetCryptoPassphrase(ctx context.Context, volumeID string, kms EncryptionKMS
|
|||||||
}
|
}
|
||||||
return passphrase, nil
|
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
|
return "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user