mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-26 02:21:34 +08:00
add overrun reset function
This commit is contained in:
parent
822f972842
commit
1f608a81e8
@ -116,6 +116,12 @@ public:
|
|||||||
return q_.size();
|
return q_.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void reset_overrun_counter()
|
||||||
|
{
|
||||||
|
std::unique_lock<std::mutex> lock(queue_mutex_);
|
||||||
|
q_.reset_overrun_counter();
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::mutex queue_mutex_;
|
std::mutex queue_mutex_;
|
||||||
std::condition_variable push_cv_;
|
std::condition_variable push_cv_;
|
||||||
|
@ -75,6 +75,11 @@ size_t SPDLOG_INLINE thread_pool::overrun_counter()
|
|||||||
return q_.overrun_counter();
|
return q_.overrun_counter();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SPDLOG_INLINE thread_pool::reset_overrun_counter()
|
||||||
|
{
|
||||||
|
q_.reset_overrun_counter();
|
||||||
|
}
|
||||||
|
|
||||||
size_t SPDLOG_INLINE thread_pool::queue_size()
|
size_t SPDLOG_INLINE thread_pool::queue_size()
|
||||||
{
|
{
|
||||||
return q_.size();
|
return q_.size();
|
||||||
|
@ -97,6 +97,7 @@ public:
|
|||||||
void post_log(async_logger_ptr &&worker_ptr, const details::log_msg &msg, async_overflow_policy overflow_policy);
|
void post_log(async_logger_ptr &&worker_ptr, const details::log_msg &msg, async_overflow_policy overflow_policy);
|
||||||
void post_flush(async_logger_ptr &&worker_ptr, async_overflow_policy overflow_policy);
|
void post_flush(async_logger_ptr &&worker_ptr, async_overflow_policy overflow_policy);
|
||||||
size_t overrun_counter();
|
size_t overrun_counter();
|
||||||
|
void reset_overrun_counter();
|
||||||
size_t queue_size();
|
size_t queue_size();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user