diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc index 9e6f4c6400084..f8040b988bab8 100644 --- a/src/rgw/rgw_admin.cc +++ b/src/rgw/rgw_admin.cc @@ -7671,7 +7671,8 @@ int main(int argc, const char **argv) int ret = init_bucket(user.get(), tenant, bucket_name, bucket_id, &bucket); if (ret < 0) { - cerr << "ERROR: could not init bucket: " << cpp_strerror(-ret) << std::endl; + ldpp_dout(dpp(), 0) << "ERROR: could not init bucket: " << cpp_strerror(-ret) << + dendl; return -ret; } @@ -7691,13 +7692,13 @@ int main(int argc, const char **argv) int i = (specified_shard_id ? shard_id : 0); for (; i < max_shards; i++) { ldpp_dout(dpp(), 20) << "INFO: " << __func__ << ": starting shard=" << i << dendl; + marker.clear(); RGWRados::BucketShard bs(static_cast(driver)->getRados()); int ret = bs.init(dpp(), bucket->get_info(), index, i, null_yield); - marker.clear(); - if (ret < 0) { - cerr << "ERROR: bs.init(bucket=" << bucket << ", shard=" << i << "): " << cpp_strerror(-ret) << std::endl; + ldpp_dout(dpp(), 0) << "ERROR: bs.init(bucket=" << bucket << ", shard=" << i << + "): " << cpp_strerror(-ret) << dendl; return -ret; } @@ -7706,7 +7707,7 @@ int main(int argc, const char **argv) // if object is specified, we use that as a filter to only retrieve some some entries ret = static_cast(driver)->getRados()->bi_list(bs, object, marker, max_entries, &entries, &is_truncated, null_yield); if (ret < 0) { - cerr << "ERROR: bi_list(): " << cpp_strerror(-ret) << std::endl; + ldpp_dout(dpp(), 0) << "ERROR: bi_list(): " << cpp_strerror(-ret) << dendl; return -ret; } ldpp_dout(dpp(), 20) << "INFO: " << __func__ <<