diff --git a/include/spdlog/logger.h b/include/spdlog/logger.h index b8b37ae0..5798c0b1 100644 --- a/include/spdlog/logger.h +++ b/include/spdlog/logger.h @@ -170,17 +170,17 @@ public: // create new logger with same sinks and configuration. virtual std::shared_ptr clone(std::string logger_name); -protected: +private: std::string name_; std::vector sinks_; - spdlog::atomic_level_t level_{level::info}; - spdlog::atomic_level_t flush_level_{level::off}; + atomic_level_t level_{level::info}; + atomic_level_t flush_level_{level::off}; err_handler custom_err_handler_{nullptr}; // common implementation for after templated public api has been resolved to format string and // args template - void log_with_format_(source_loc loc, const level lvl, const format_string_t &format_string, Args &&...args) { + void log_with_format_(source_loc loc, const level lvl, const format_string_t &format_string, const Args &...args) { assert(should_log(lvl)); try { memory_buf_t buf; diff --git a/src/details/async_log_msg.cpp b/src/details/async_log_msg.cpp index f47c882b..d5d95c59 100644 --- a/src/details/async_log_msg.cpp +++ b/src/details/async_log_msg.cpp @@ -43,7 +43,7 @@ async_log_msg &async_log_msg::operator=(const async_log_msg &other) { } async_log_msg &async_log_msg::operator=(async_log_msg &&other) noexcept { - log_msg::operator=(std::forward(other)); + log_msg::operator=(std::forward(other)); msg_type_ = other.msg_type_; buffer_ = std::move(other.buffer_); update_string_views();