]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-objectstore-tool: Create section around log/missing/divergent_priors of --op log
authorDavid Zafman <dzafman@redhat.com>
Wed, 15 Apr 2015 22:40:41 +0000 (15:40 -0700)
committerDavid Zafman <dzafman@redhat.com>
Thu, 25 Feb 2016 20:50:21 +0000 (12:50 -0800)
Remove extra new lines in the output

Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 548147b412eebe57861768e5fd66360c2582d2c6)

src/tools/ceph_objectstore_tool.cc

index ffe6a82f130ec63f0e6f4e5506956aa79faea779..c8df7ac0ed7bb8306520248abe9391dc00a74bfd 100644 (file)
@@ -3258,16 +3258,15 @@ int main(int argc, char **argv)
       if (ret > 0)
           goto out;
 
+      formatter->open_object_section("op_log");
       formatter->open_object_section("pg_log_t");
       log.dump(formatter);
       formatter->close_section();
       formatter->flush(cout);
-      cout << std::endl;
       formatter->open_object_section("pg_missing_t");
       missing.dump(formatter);
       formatter->close_section();
       formatter->flush(cout);
-      cout << std::endl;
       formatter->open_object_section("map");
       formatter->open_array_section("divergent_priors");
       for (map<eversion_t, hobject_t>::iterator it = divergent_priors.begin();
@@ -3279,8 +3278,8 @@ int main(int argc, char **argv)
       }
       formatter->close_section();
       formatter->close_section();
+      formatter->close_section();
       formatter->flush(cout);
-      cout << std::endl;
     } else if (op == "rm-past-intervals") {
       ObjectStore::Transaction tran;
       ObjectStore::Transaction *t = &tran;