diff --git a/include/spdlog/sinks/ansicolor_sink.h b/include/spdlog/sinks/ansicolor_sink.h index 3b79976d..3f6c63b6 100644 --- a/include/spdlog/sinks/ansicolor_sink.h +++ b/include/spdlog/sinks/ansicolor_sink.h @@ -24,7 +24,7 @@ namespace sinks { * If no color terminal detected, omit the escape codes. */ template -class ansicolor_sink : public sink +class ansicolor_sink SPDLOG_FINAL : public sink { public: using mutex_t = typename ConsoleMutex::mutex_t; @@ -84,7 +84,7 @@ public: const std::string on_cyan = "\033[46m"; const std::string on_white = "\033[47m"; - void log(const details::log_msg &msg) SPDLOG_FINAL override + void log(const details::log_msg &msg) override { // Wrap the originally formatted message in color codes. // If color is not supported in the terminal, log as is instead. @@ -110,19 +110,19 @@ public: fflush(target_file_); } - void flush() SPDLOG_FINAL override + void flush() override { std::lock_guard lock(mutex_); fflush(target_file_); } - void set_pattern(const std::string &pattern) override SPDLOG_FINAL + void set_pattern(const std::string &pattern) SPDLOG_FINAL { std::lock_guard lock(mutex_); formatter_ = std::unique_ptr(new pattern_formatter(pattern)); } - void set_formatter(std::unique_ptr sink_formatter) override SPDLOG_FINAL + void set_formatter(std::unique_ptr sink_formatter) override { std::lock_guard lock(mutex_); formatter_ = std::move(sink_formatter);