|
UCILoader 1.1.2
Small C++ library that allows user to connect to a chess engines via UCI protocol.
|
Thread-safe buffer for storing log messages. More...
#include <Logger.h>
Public Member Functions | |
| void | push_back (const std::string &msg) |
| Add a message to the buffer. | |
| std::vector< std::string > | snapshot () const |
| Get a snapshot of all messages currently in the buffer. | |
Thread-safe buffer for storing log messages.
LogBuffer provides thread-safe storage of log messages in memory. It's useful for capturing recent messages for debugging or diagnostics without writing to disk.
The buffer maintains a snapshot of logged messages that can be retrieved with the snapshot() method.
Usage Example:
| void UCILoader::LogBuffer::push_back | ( | const std::string & | msg | ) |
Add a message to the buffer.
| msg | The message string to add |
| std::vector< std::string > UCILoader::LogBuffer::snapshot | ( | ) | const |
Get a snapshot of all messages currently in the buffer.