#include <Loki.hpp>
Classes | |
struct | logInfo_t |
Public Member Functions | |
loki_api_sink (const std::string &lokiAddress) | |
~loki_api_sink () | |
Protected Member Functions | |
void | sink_it_ (const details::log_msg &msg) override |
void | flush_ () override |
Private Attributes | |
bool | _lokiAvailable {false} |
std::unique_ptr< HTTP > | _connHandler |
std::string | _basicInformation |
std::vector< struct logInfo_t > | _internalLogBuffer |
A custom sink for spdlog that sends log messages to a Loki server.
The loki_api_sink class is a custom sink for spdlog that sends log messages to a Loki server. It provides functionality to send log messages to a specified Loki server address. The log messages are sent using HTTP requests.
Mutex | The type of mutex to use for thread-safety. |
|
explicit |
Constructs a loki_api_sink object with the specified Loki server address.
lokiAddress | The address of the Loki server to send log messages to. |
Definition at line 19 of file Loki.cpp.
|
default |
Destroys the loki_api_sink object.
|
overrideprotected |
Flushes any buffered log messages.
This function is called by spdlog to flush any buffered log messages. It is overridden from the base_sink class.
Definition at line 81 of file Loki.cpp.
|
overrideprotected |
Sends the log message to the Loki server.
This function is called by spdlog to send the log message to the Loki server. It is overridden from the base_sink class.
msg | The log message to be sent. |
Definition at line 66 of file Loki.cpp.
|
private |
|
private |
|
private |
|
private |