From a2bd2aa7babb4ad45ba21c70f9d179fda27742aa Mon Sep 17 00:00:00 2001 From: David Zafman Date: Thu, 7 Aug 2014 14:11:21 -0700 Subject: [PATCH] ceph_objectstore_tool: Minor improvements Make all non-error non-debug output to stdout Fix a message Signed-off-by: David Zafman --- src/tools/ceph_objectstore_tool.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/tools/ceph_objectstore_tool.cc b/src/tools/ceph_objectstore_tool.cc index 6282e3ace52de..13aa8566d2c98 100644 --- a/src/tools/ceph_objectstore_tool.cc +++ b/src/tools/ceph_objectstore_tool.cc @@ -643,7 +643,7 @@ int export_file(ObjectStore *store, coll_t cid, ghobject_t &obj) if (ret < 0) return ret; - cerr << "read " << obj << std::endl; + cout << "Read " << obj << std::endl; total = st.st_size; if (debug) @@ -785,7 +785,7 @@ int do_export(ObjectStore *fs, coll_t coll, spg_t pgid, pg_info_t &info, PGLog::IndexedLog log; pg_missing_t missing; - cerr << "Exporting " << pgid << std::endl; + cout << "Exporting " << pgid << std::endl; int ret = get_log(fs, coll, pgid, info, log, missing); if (ret > 0) @@ -1836,11 +1836,11 @@ int main(int argc, char **argv) } } - cerr << colls_to_check.size() << " pgs to scan" << std::endl; + cout << colls_to_check.size() << " pgs to scan" << std::endl; for (vector::iterator i = colls_to_check.begin(); i != colls_to_check.end(); ++i, ++scanned) { - cerr << "Scanning " << *i << ", " << scanned << "/" + cout << "Scanning " << *i << ", " << scanned << "/" << colls_to_check.size() << " completed" << std::endl; ghobject_t next; while (!next.is_max()) { @@ -1883,7 +1883,7 @@ int main(int argc, char **argv) cout << *i << "/" << *obj << " is lost" << std::endl; } if (op == "fix-lost") { - cerr << *i << "/" << *obj << " is lost, fixing" << std::endl; + cout << *i << "/" << *obj << " is lost, fixing" << std::endl; oi.clear_flag(object_info_t::FLAG_LOST); bufferlist bl2; ::encode(oi, bl2); @@ -1901,7 +1901,7 @@ int main(int argc, char **argv) } } } - cerr << "Completed" << std::endl; + cout << "Completed" << std::endl; UMOUNT: fs->sync_and_flush(); @@ -1936,7 +1936,7 @@ int main(int argc, char **argv) continue; } if (snap != CEPH_NOSNAP && debug) { - cerr << "skipping snapped dir " << *it + cout << "skipping snapped dir " << *it << " (pg " << pgid << " snap " << snap << ")" << std::endl; continue; } -- 2.39.5