diff --git a/example/ex3/ex3.cpp b/example/ex3/ex3.cpp index 281a6e33..cc77ca6e 100644 --- a/example/ex3/ex3.cpp +++ b/example/ex3/ex3.cpp @@ -34,7 +34,7 @@ main(int argc, char ** argv) { log_config::encoding = CE_Xterm; log_config::function_entry_color = 69; log_config::function_exit_color = 70; - log_config::code_location_color = 166; + log_config::code_location_color = color_spec::xterm(166); int n = 3; diff --git a/include/indentlog/log_config.hpp b/include/indentlog/log_config.hpp index 76ecf63f..4f48b0f6 100644 --- a/include/indentlog/log_config.hpp +++ b/include/indentlog/log_config.hpp @@ -41,7 +41,7 @@ namespace xo { /* when .location_enabled, write [file:line] starting this many chars from left margin */ static std::uint32_t location_tab; /* color to use for code location */ - static std::uint32_t code_location_color; + static color_spec code_location_color; }; /*log_config_impl*/ template @@ -101,8 +101,8 @@ namespace xo { log_config_impl::location_tab = 80; template - std::uint32_t - log_config_impl::code_location_color = 31; + color_spec + log_config_impl::code_location_color = color_spec::red(); using log_config = log_config_impl; } /*namespace xo*/ diff --git a/include/indentlog/log_state.hpp b/include/indentlog/log_state.hpp index e99ef44a..834aa119 100644 --- a/include/indentlog/log_state.hpp +++ b/include/indentlog/log_state.hpp @@ -348,7 +348,7 @@ namespace xo { std::stringstream ss; ss << code_location(this->file_, this->line_, - color_spec(log_config::encoding, log_config::code_location_color)); + log_config::code_location_color); std::string ss_str = std::move(ss.str()); /*c++20*/ sbuf2->sputn(ss_str.c_str(), ss_str.size());