]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Revert "common/Formatter: add newline to flushed output if m_pretty"
authorSage Weil <sage@inktank.com>
Mon, 16 Dec 2013 00:23:09 +0000 (16:23 -0800)
committerSage Weil <sage@inktank.com>
Mon, 16 Dec 2013 00:23:09 +0000 (16:23 -0800)
This reverts commit d6146b0d915f1420b5e76f7037f656460c314461.

As Yehuda points out, this does not properly handle cases where we flush
the same output stream multiple times.

src/common/Formatter.cc

index 80b5ed0261d56344c247fd85b4037950e32483b9..4ef833a45f80776ed352aba4a24ee8c66192d641 100644 (file)
@@ -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("");
 }