]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/common/Formatter.cc
update sources to v12.2.1
[ceph.git] / ceph / src / common / Formatter.cc
index 1a400aaa159bc27b7917cdeddba98d11a04b0b74..3b3589db805ca18ce52458ecb1de89f98ba8ead2 100644 (file)
@@ -127,6 +127,8 @@ void JSONFormatter::flush(std::ostream& os)
 {
   finish_pending_string();
   os << m_ss.str();
+  if (m_line_break_enabled)
+    os << "\n";
   m_ss.clear();
   m_ss.str("");
 }
@@ -326,6 +328,8 @@ void XMLFormatter::flush(std::ostream& os)
    * we should NOT output a newline. This primarily triggers on HTTP redirects */
   if (m_pretty && !m_ss_str.empty())
     os << "\n";
+  else if (m_line_break_enabled)
+    os << "\n";
   m_ss.clear();
   m_ss.str("");
 }