]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
XMLFormatter: fix pretty printing
authorJosh Durgin <josh.durgin@inktank.com>
Thu, 27 Dec 2012 18:50:53 +0000 (10:50 -0800)
committerJosh Durgin <josh.durgin@inktank.com>
Wed, 16 Jan 2013 21:14:49 +0000 (13:14 -0800)
commit4e5a07bceb5fe853efabebcd2caf4c63d557369b
treea76a86408a7ffd866378d3525138f49135761993
parent8fea6dee76e6da904668d8e70cce06f6d3c02824
XMLFormatter: fix pretty printing

It used the wrong indentation level and did not add a newline after
closing a section. dump_stream() did not indent at all.

Simplify a little and remove the parameter from print_spaces(). If we just
remove the element from m_sections before calling print_spaces() in
close_section(), the number of elements in m_sections is always the
indentation level.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
src/common/Formatter.cc
src/common/Formatter.h