10 #ifndef logger_types_string_log_hpp
11 #define logger_types_string_log_hpp
13 #include "generated/string_log_generated.h"
38 auto gs = CreateString_log_fb(
builder, _msg);
46 auto gs = CreateString_log_fb(
builder, _msg);
56 return VerifyString_log_fbBuffer(verifier);
64 static_cast<void>(len);
66 auto rgs = GetString_log_fb(msgBuffer);
68 if(rgs->message() ==
nullptr)
return "";
69 else return rgs->message()->c_str();
The MagAO-X logger flatbuffer log base type.
msgLen2T msgLenT
The type used to refer to the message length, regardless of length.
static void * messageBuffer(bufferPtrT &logBuffer)
Get the message buffer address.
std::shared_ptr< char > bufferPtrT
The log entry buffer smart pointer.
Message type for resolving log messages with a f.b. builder.
flatbuffers::FlatBufferBuilder builder
Base class for logs consisting of a flatbuffer message.
messageT(const std::string &msg)
messageT(const char *msg)
Base class for logs consisting of a string message.
static bool verify(flatlogs::bufferPtrT &logBuff, flatlogs::msgLenT len)
static std::string msgString(void *msgBuffer, flatlogs::msgLenT len)
Get the message formatted for human consumption.