Skip to content

Commit

Permalink
cleanup: use %q instead of %s for logging
Browse files Browse the repository at this point in the history
Signed-off-by: Rakshith R <rar@redhat.com>
  • Loading branch information
Rakshith-R authored and nixpanic committed Jan 6, 2022
1 parent 1f753b9 commit 1f93b1e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/rbd/rbd_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ func (rv *rbdVolume) deleteImage(ctx context.Context) error {
// otherwise removes the image from trash.
func (rv *rbdVolume) trashRemoveImage(ctx context.Context) error {
// attempt to use Ceph manager based deletion support if available
log.DebugLog(ctx, "rbd: adding task to remove image %s with id %s from trash", rv, rv.ImageID)
log.DebugLog(ctx, "rbd: adding task to remove image %q with id %q from trash", rv, rv.ImageID)

ta, err := rv.conn.GetTaskAdmin()
if err != nil {
Expand All @@ -700,7 +700,7 @@ func (rv *rbdVolume) trashRemoveImage(ctx context.Context) error {
return err
}
} else {
log.DebugLog(ctx, "rbd: successfully added task to move image %s with id %s to trash", rv, rv.ImageID)
log.DebugLog(ctx, "rbd: successfully added task to move image %q with id %q to trash", rv, rv.ImageID)
}

return nil
Expand Down Expand Up @@ -826,7 +826,7 @@ func (rv *rbdVolume) flattenRbdImage(
return nil
}

log.DebugLog(ctx, "rbd: adding task to flatten image %s", rv)
log.DebugLog(ctx, "rbd: adding task to flatten image %q", rv)

ta, err := rv.conn.GetTaskAdmin()
if err != nil {
Expand All @@ -849,7 +849,7 @@ func (rv *rbdVolume) flattenRbdImage(
if forceFlatten || depth >= hardlimit {
return fmt.Errorf("%w: flatten is in progress for image %s", ErrFlattenInProgress, rv.RbdImageName)
}
log.DebugLog(ctx, "successfully added task to flatten image %s", rv)
log.DebugLog(ctx, "successfully added task to flatten image %q", rv)
}
if !rbdCephMgrSupported {
log.ErrorLog(
Expand Down

0 comments on commit 1f93b1e

Please sign in to comment.