From 6a7bbe86d2792374560790f6fc3e479352128d60 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 10 Apr 2012 22:21:31 -0700 Subject: [PATCH] filestore: dump transaction in json on error Signed-off-by: Sage Weil --- src/os/FileStore.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index dabeaba611347..68be41a07f7bd 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -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"); } -- 2.39.5