]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: pretty json from `tell` commands 14105/head
authorJohn Spray <john.spray@redhat.com>
Thu, 23 Mar 2017 13:31:41 +0000 (09:31 -0400)
committerJohn Spray <john.spray@redhat.com>
Thu, 13 Apr 2017 16:28:20 +0000 (12:28 -0400)
The overhead of the whitespace is trivial and
makes the output somewhat human readable.  Previously
I was always taking `damage ls` into a file and
parsing it out with python.

Signed-off-by: John Spray <john.spray@redhat.com>
src/mds/MDSRank.cc

index eb538f9c849e214bb3a92a1fdba2cdeb78457bfc..d1cb909b754508f528ceb8dd248b0e3c8b20740b 100644 (file)
@@ -2571,7 +2571,7 @@ bool MDSRankDispatcher::handle_command(
       return true;
     }
 
-    Formatter *f = new JSONFormatter();
+    Formatter *f = new JSONFormatter(true);
     dump_sessions(filter, f);
     f->flush(*ds);
     delete f;
@@ -2591,7 +2591,7 @@ bool MDSRankDispatcher::handle_command(
     *need_reply = false;
     return true;
   } else if (prefix == "damage ls") {
-    Formatter *f = new JSONFormatter();
+    Formatter *f = new JSONFormatter(true);
     damage_table.dump(f);
     f->flush(*ds);
     delete f;