mirror of
https://github.com/ceph/ceph
synced 2025-02-20 01:17:47 +00:00
Merge pull request #61775 from yuvalif/wip-yuval-fix-loggin-obj-name
rgw/logging: flush command should print flushed log object name
This commit is contained in:
commit
7a17c0b1fe
@ -7741,13 +7741,14 @@ int main(int argc, const char **argv)
|
||||
cerr << "ERROR: failed to get pending logging object name from target bucket '" << configuration.target_bucket << "'" << std::endl;
|
||||
return -ret;
|
||||
}
|
||||
const auto old_obj = obj_name;
|
||||
ret = rgw::bucketlogging::rollover_logging_object(configuration, target_bucket, obj_name, dpp(), null_yield, true, &objv_tracker);
|
||||
if (ret < 0) {
|
||||
cerr << "ERROR: failed to flush pending logging object '" << obj_name
|
||||
cerr << "ERROR: failed to flush pending logging object '" << old_obj
|
||||
<< "' to target bucket '" << configuration.target_bucket << "'" << std::endl;
|
||||
return -ret;
|
||||
}
|
||||
cout << "flushed pending logging object '" << obj_name
|
||||
cout << "flushed pending logging object '" << old_obj
|
||||
<< "' to target bucket '" << configuration.target_bucket << "'" << std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
@ -344,13 +344,14 @@ class RGWPostBucketLoggingOp : public RGWDefaultResponseOp {
|
||||
ldpp_dout(this, 1) << "ERROR: failed to get pending logging object name from target bucket '" << target_bucket_id << "'" << dendl;
|
||||
return;
|
||||
}
|
||||
const auto old_obj = obj_name;
|
||||
op_ret = rgw::bucketlogging::rollover_logging_object(configuration, target_bucket, obj_name, this, null_yield, true, &objv_tracker);
|
||||
if (op_ret < 0) {
|
||||
ldpp_dout(this, 1) << "ERROR: failed to flush pending logging object '" << obj_name
|
||||
ldpp_dout(this, 1) << "ERROR: failed to flush pending logging object '" << old_obj
|
||||
<< "' to target bucket '" << target_bucket_id << "'" << dendl;
|
||||
return;
|
||||
}
|
||||
ldpp_dout(this, 20) << "INFO: flushed pending logging object '" << obj_name
|
||||
ldpp_dout(this, 20) << "INFO: flushed pending logging object '" << old_obj
|
||||
<< "' to target bucket '" << configuration.target_bucket << "'" << dendl;
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user