Fix #849, Can't build with SPDLOG_ENABLE_MESSAGE_COUNTER

pull/861/head
Bak, Jin Hyeong 7 years ago
parent 2fa538779f
commit f8bb7e5677

@ -358,7 +358,7 @@ inline void spdlog::logger::default_err_handler_(const std::string &msg)
fmt::print(stderr, "[*** LOG ERROR ***] [{}] [{}] {}\n", date_buf, name(), msg); fmt::print(stderr, "[*** LOG ERROR ***] [{}] [{}] {}\n", date_buf, name(), msg);
} }
inline void spdlog::logger::incr_msg_counter_(details::log_msg &msg) inline void spdlog::logger::incr_msg_counter_(const details::log_msg &msg)
{ {
msg.msg_id = msg_counter_.fetch_add(1, std::memory_order_relaxed); msg.msg_id = msg_counter_.fetch_add(1, std::memory_order_relaxed);
} }

@ -152,7 +152,7 @@ protected:
void default_err_handler_(const std::string &msg); void default_err_handler_(const std::string &msg);
// increment the message count (only if defined(SPDLOG_ENABLE_MESSAGE_COUNTER)) // increment the message count (only if defined(SPDLOG_ENABLE_MESSAGE_COUNTER))
void incr_msg_counter_(details::log_msg &msg); void incr_msg_counter_(const details::log_msg &msg);
const std::string name_; const std::string name_;
std::vector<sink_ptr> sinks_; std::vector<sink_ptr> sinks_;

Loading…
Cancel
Save