mirror of
https://github.com/ceph/ceph
synced 2024-12-27 14:03:25 +00:00
common/Formatter: add newline to flushed output if m_pretty
This applies to json-pretty and xml-pretty modes. Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
parent
7f0d644cb4
commit
d6146b0d91
@ -91,6 +91,8 @@ void JSONFormatter::flush(std::ostream& os)
|
||||
{
|
||||
finish_pending_string();
|
||||
os << m_ss.str();
|
||||
if (m_pretty)
|
||||
os << "\n";
|
||||
m_ss.clear();
|
||||
m_ss.str("");
|
||||
}
|
||||
@ -290,6 +292,8 @@ void XMLFormatter::flush(std::ostream& os)
|
||||
{
|
||||
finish_pending_string();
|
||||
os << m_ss.str();
|
||||
if (m_pretty)
|
||||
os << "\n";
|
||||
m_ss.clear();
|
||||
m_ss.str("");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user