mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-29 01:29:35 +08:00
Fix ringbuffer tests for newline (#3436)
This commit is contained in:
@@ -21,7 +21,11 @@ template <typename Mutex>
|
||||
class ringbuffer_sink final : public base_sink<Mutex> {
|
||||
public:
|
||||
explicit ringbuffer_sink(size_t n_items)
|
||||
: q_{n_items} {}
|
||||
: q_{n_items} {
|
||||
if (n_items == 0) {
|
||||
throw_spdlog_ex("ringbuffer_sink: n_items cannot be zero");
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<details::log_msg_buffer> last_raw(size_t lim = 0) {
|
||||
std::lock_guard<Mutex> lock(base_sink<Mutex>::mutex_);
|
||||
|
Reference in New Issue
Block a user