Agora
1.2.0
Agora project
|
Go to the documentation of this file.
20 template<
typename Mutex>
28 std::vector<details::log_msg_buffer>
last_raw(
size_t lim = 0)
31 auto items_available =
q_.size();
32 auto n_items = lim > 0 ? (std::min)(lim, items_available) : items_available;
33 std::vector<details::log_msg_buffer> ret;
35 for (
size_t i = (items_available - n_items);
i < items_available;
i++)
37 ret.push_back(
q_.at(
i));
45 auto items_available =
q_.size();
46 auto n_items = lim > 0 ? (std::min)(lim, items_available) : items_available;
47 std::vector<std::string> ret;
49 for (
size_t i = (items_available - n_items);
i < items_available;
i++)
53 #ifdef SPDLOG_USE_STD_FORMAT
54 ret.push_back(std::move(formatted));
void sink_it_(const details::log_msg &msg) override
Definition: ringbuffer_sink.h:63
ringbuffer_sink(size_t n_items)
Definition: ringbuffer_sink.h:24
details::circular_q< details::log_msg_buffer > q_
Definition: ringbuffer_sink.h:70
void flush_() override
Definition: ringbuffer_sink.h:67
Definition: base_sink.h:19
for i
Definition: generate_data.m:107
auto to_string(const T &value) -> std::string
Definition: format.h:2882
Definition: log_msg_buffer.h:14
std::vector< std::string > last_formatted(size_t lim=0)
Definition: ringbuffer_sink.h:42
std::vector< details::log_msg_buffer > last_raw(size_t lim=0)
Definition: ringbuffer_sink.h:28
Definition: ringbuffer_sink.h:21
Definition: circular_q.h:13