From: Sage Weil Date: Mon, 16 Dec 2013 00:23:09 +0000 (-0800) Subject: Revert "common/Formatter: add newline to flushed output if m_pretty" X-Git-Tag: v0.75~99 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f192a600c5a6c957dde93c25e88b488eec189765;p=ceph.git Revert "common/Formatter: add newline to flushed output if m_pretty" This reverts commit d6146b0d915f1420b5e76f7037f656460c314461. As Yehuda points out, this does not properly handle cases where we flush the same output stream multiple times. --- diff --git a/src/common/Formatter.cc b/src/common/Formatter.cc index 80b5ed0261d5..4ef833a45f80 100644 --- a/src/common/Formatter.cc +++ b/src/common/Formatter.cc @@ -91,8 +91,6 @@ void JSONFormatter::flush(std::ostream& os) { finish_pending_string(); os << m_ss.str(); - if (m_pretty) - os << "\n"; m_ss.clear(); m_ss.str(""); } @@ -292,8 +290,6 @@ void XMLFormatter::flush(std::ostream& os) { finish_pending_string(); os << m_ss.str(); - if (m_pretty) - os << "\n"; m_ss.clear(); m_ss.str(""); }