diff --git a/include/indentlog/function.hpp b/include/indentlog/function.hpp index 65ee5ae5..d79417e0 100644 --- a/include/indentlog/function.hpp +++ b/include/indentlog/function.hpp @@ -26,12 +26,12 @@ namespace xo { * 31 = red */ function_name_impl(function_style style, - color_encoding encoding, - std::uint32_t color, + color_spec spec, std::string_view pretty) - : style_{style}, color_spec_(encoding, color), pretty_{pretty} {} + : style_{style}, color_spec_{spec}, pretty_{pretty} {} function_style style() const { return style_; } + color_spec const & spec() const { return color_spec_; } color_encoding encoding() const { return color_spec_.encoding(); } std::uint32_t color() const { return color_spec_.code(); } std::string_view const & pretty() const { return pretty_; } diff --git a/include/indentlog/log_state.hpp b/include/indentlog/log_state.hpp index 814bf070..ad92c08e 100644 --- a/include/indentlog/log_state.hpp +++ b/include/indentlog/log_state.hpp @@ -233,7 +233,7 @@ namespace xo { this->ss_ << ' '; /* scope name - note no trailing newline; expect .preamble()/.postamble() caller to supply */ - this->ss_ << function_name(style, encoding, fn_color, name1) << name2; + this->ss_ << function_name(style, color_spec(encoding, fn_color), name1) << name2; } /*entryexit_aux*/ template