10 #ifndef logger_types_config_log_hpp
11 #define logger_types_config_log_hpp
13 #include "generated/config_log_generated.h"
40 const std::string &
value,
41 const std::string & source
44 auto _name =
builder.CreateString(name);
46 auto _source =
builder.CreateString(source);
49 auto fp = CreateConfig_log_fb(
builder, _name, code, _value, _source);
61 return VerifyConfig_log_fbBuffer(verifier);
69 static_cast<void>(len);
71 auto fbs = GetConfig_log_fb(msgBuffer);
73 std::string
msg =
"Config: ";
77 msg += fbs->name()->c_str();
84 msg += fbs->value()->c_str();
91 msg += fbs->source()->c_str();
The MagAO-X logger flatbuffer log base type.
uint16_t eventCodeT
The type of an event code (16-bit unsigned int).
msgLen2T msgLenT
The type used to refer to the message length, regardless of length.
int8_t logPrioT
The type of the log priority code.
static void * messageBuffer(bufferPtrT &logBuffer)
Get the message buffer address.
std::shared_ptr< char > bufferPtrT
The log entry buffer smart pointer.
GeneratorWrapper< T > value(T &&value)
constexpr static logPrioT LOG_INFO
Informational. The info log level is the lowest level recorded during normal operations.
The type of the input message.
messageT(const std::string &name, const int &code, const std::string &value, const std::string &source)
Construct from components.
Log entry recording configuration settings at startup.
static std::string msgString(void *msgBuffer, flatlogs::msgLenT len)
Get the message formatte for human consumption.
static bool verify(flatlogs::bufferPtrT &logBuff, flatlogs::msgLenT len)
static const flatlogs::eventCodeT eventCode
The event code.
static const flatlogs::logPrioT defaultLevel
The default level.
Message type for resolving log messages with a f.b. builder.
flatbuffers::FlatBufferBuilder builder
Base class for logs consisting of a flatbuffer message.