From: John Spray Date: Thu, 23 Mar 2017 13:31:41 +0000 (-0400) Subject: mds: pretty json from `tell` commands X-Git-Tag: v12.0.2~44^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F14105%2Fhead;p=ceph.git mds: pretty json from `tell` commands 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 --- diff --git a/src/mds/MDSRank.cc b/src/mds/MDSRank.cc index eb538f9c849..d1cb909b754 100644 --- a/src/mds/MDSRank.cc +++ b/src/mds/MDSRank.cc @@ -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;