diff --git a/example/example.cpp b/example/example.cpp index 378e8b8e..a6bcc3d1 100644 --- a/example/example.cpp +++ b/example/example.cpp @@ -113,7 +113,7 @@ void color_example() auto color_sink = std::make_shared(console_out); // wraps around another sink auto color_logger = spd::details::registry::instance().create("Color", color_sink); color_logger->set_level(spd::level::trace); - color_sink->setColor(spd::level::info, color_sink->bold + color_sink->green); + color_sink->set_color(spd::level::info, color_sink->bold + color_sink->green); color_logger->info("Testing color logger..."); color_logger->trace("Trace"); color_logger->debug("Debug"); diff --git a/include/spdlog/sinks/ansicolor_sink.h b/include/spdlog/sinks/ansicolor_sink.h index a256f3b8..2eaaa801 100644 --- a/include/spdlog/sinks/ansicolor_sink.h +++ b/include/spdlog/sinks/ansicolor_sink.h @@ -30,7 +30,7 @@ public: virtual void log(const details::log_msg& msg) override; virtual void flush() override; - void setColor(level::level_enum level, const std::string& color); + void set_color(level::level_enum level, const std::string& color); /// \name Formatting codes //@{ @@ -124,7 +124,7 @@ inline void ansicolor_sink::flush() sink_->flush(); } -inline void ansicolor_sink::setColor(level::level_enum level, const std::string& color) +inline void ansicolor_sink::set_color(level::level_enum level, const std::string& color) { colors_[level] = color; }