mirror of
https://github.com/gabime/spdlog.git
synced 2025-01-24 06:32:06 +08:00
Added comment in ringbuffer_sink.h
This commit is contained in:
parent
8f7400731e
commit
11770fc7e5
@ -16,7 +16,12 @@
|
||||
namespace spdlog {
|
||||
namespace sinks {
|
||||
/*
|
||||
* Ring buffer sink
|
||||
* Ring buffer sink. Holds fixed amount of log messages in memory. When the buffer is full, new messages override the old ones.
|
||||
* Useful for storing debug data in memory in case of error.
|
||||
* Example:
|
||||
* auto rb_sink = std::make_shared<spdlog::sinks::ringbuffer_sink_mt>(128);
|
||||
* spdlog::logger logger("rb_logger", rb_sink);
|
||||
* rb->drain([](const std::string_view msg) { process(msg);});
|
||||
*/
|
||||
template<typename Mutex>
|
||||
class ringbuffer_sink final : public base_sink<Mutex>
|
||||
|
Loading…
Reference in New Issue
Block a user