X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fsrc%2Fcommon%2FFormatter.cc;h=3b3589db805ca18ce52458ecb1de89f98ba8ead2;hb=181888fb293938ba79f4c96c14bf1459f38d18af;hp=1a400aaa159bc27b7917cdeddba98d11a04b0b74;hpb=36f6c5ea099d43087ff0276121fd34e71668ae0e;p=ceph.git diff --git a/ceph/src/common/Formatter.cc b/ceph/src/common/Formatter.cc index 1a400aaa1..3b3589db8 100644 --- a/ceph/src/common/Formatter.cc +++ b/ceph/src/common/Formatter.cc @@ -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(""); }