diff --git a/include/nestlog/log_config.hpp b/include/nestlog/log_config.hpp index 00e49249..76ecf63f 100644 --- a/include/nestlog/log_config.hpp +++ b/include/nestlog/log_config.hpp @@ -19,7 +19,7 @@ namespace xo { static bool time_local_flag; /* true to log time-of-day with microsecond precision; false for millisecond precision */ static bool time_usec_flag; - /* spaces per nesting level */ + /* spaces per nesting level. 0 -> no indenting */ static std::uint32_t indent_width; /* max #of spaces to introduce when indenting */ static std::uint32_t max_indent_width; @@ -62,7 +62,7 @@ namespace xo { template std::uint32_t - log_config_impl::indent_width = 1; + log_config_impl::indent_width = 2; template std::uint32_t diff --git a/include/nestlog/log_state.hpp b/include/nestlog/log_state.hpp index 9bf6fefb..01566380 100644 --- a/include/nestlog/log_state.hpp +++ b/include/nestlog/log_state.hpp @@ -229,7 +229,7 @@ namespace xo { << ")"; } - if (log_config::indent_width > 1) + if (log_config::indent_width > 0) this->ss_ << ' '; /* scope name - note no trailing newline; expect .preamble()/.postamble() caller to supply */