]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph_objectstore_tool: Minor improvements
authorDavid Zafman <david.zafman@inktank.com>
Thu, 7 Aug 2014 21:11:21 +0000 (14:11 -0700)
committerDavid Zafman <dzafman@redhat.com>
Thu, 28 Aug 2014 23:22:15 +0000 (16:22 -0700)
Make all non-error non-debug output to stdout
Fix a message

Signed-off-by: David Zafman <david.zafman@inktank.com>
src/tools/ceph_objectstore_tool.cc

index 6282e3ace52deb1e0628243c48baaf2b8cd7ce31..13aa8566d2c984e401d68e77b318c76143883893 100644 (file)
@@ -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<coll_t>::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;
     }