Yarilo v0.9.9
WPA2 Decrypter & Packet Analyzer
|
A sink for logging messages in a protobuf format. More...
#include <log_sink.h>
Public Member Functions | |
ProtoSink (uint64_t max_entries=50) | |
Constructs a ProtoSink with a maximum number of entries. | |
~ProtoSink () override=default | |
std::vector< proto::LogEntry * > | get_entries () |
Retrieves all log entries from the sink. This method locks the sink, fetches all entries, and returns them. | |
void | stop () |
Stops the sink and all waiting clients. | |
bool | is_stopped () |
Checks if the sink is stopped. | |
Protected Member Functions | |
void | sink_it_ (const spdlog::details::log_msg &msg) override |
Processes and stores a log message. | |
void | flush_ () override |
A sink for logging messages in a protobuf format.
This class is a template-based sink that can be used with different types of mutexes (standard or null mutex). It stores log entries in a queue and provides access to the stored entries.
Mutex | The type of mutex used for thread-safety. |
|
inline |
Constructs a ProtoSink with a maximum number of entries.
[in] | max_entries | Maximum number of log entries to store in the queue. |
|
overridedefault |
|
inlineoverrideprotected |
|
inline |
Retrieves all log entries from the sink. This method locks the sink, fetches all entries, and returns them.
|
inline |
Checks if the sink is stopped.
|
inlineoverrideprotected |
Processes and stores a log message.
[in] | msg | The log message to be processed. |
|
inline |
Stops the sink and all waiting clients.