]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
filestore: dump transaction in json on error
authorSage Weil <sage.weil@dreamhost.com>
Wed, 11 Apr 2012 05:21:31 +0000 (22:21 -0700)
committerSage Weil <sage@newdream.net>
Thu, 12 Apr 2012 17:59:22 +0000 (10:59 -0700)
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/os/FileStore.cc

index dabeaba611347f28bfa4c8071cdab3d7c1259bd6..68be41a07f7bd4ee605cd12563d720994ca9f40b 100644 (file)
@@ -2826,7 +2826,11 @@ unsigned FileStore::_do_transaction(Transaction& t, uint64_t op_seq, int trans_n
                << " (" << spos << ", or op " << spos.op << ", counting from 0)" << dendl;
        dout(0) << msg << dendl;
        dout(0) << " transaction dump:\n";
-       t.dump(*_dout);
+       JSONFormatter f(true);
+       f.open_object_section("transaction");
+       t.dump(&f);
+       f.close_section();
+       f.flush(*_dout);
        *_dout << dendl;
        assert(0 == "unexpected error");
       }