10#ifndef logger_types_empty_log_hpp
11#define logger_types_empty_log_hpp
13#include "../logMeta.hpp"
39template<
class derivedT>
48 static_cast<void>(msg);
61 static_cast<void>(msgBuffer);
62 static_cast<void>(msg);
76 static_cast<void>(msg);
77 static_cast<void>(msgBuffer);
78 static_cast<void>(len);
88 static_cast<void>(logBuff);
94 static_cast<void>(msgBuffer);
95 static_cast<void>(len);
97 return derivedT::msg();
102 const uint8_t * binarySchema,
103 const unsigned int binarySchemaLength
106 static_cast<void>(len);
107 static_cast<void>(msgBuffer);
108 static_cast<void>(binarySchema);
109 static_cast<void>(binarySchemaLength);
119 static_cast<void>(member);
121 std::cerr <<
"meta data doesn't make sense for " <<
eventCodeName(derivedT::eventCode) <<
"\n";
The MagAO-X logger flatbuffer log base type.
msgLen2T msgLenT
The type used to refer to the message length, regardless of length.
std::shared_ptr< char > bufferPtrT
The log entry buffer smart pointer.
Empty type for resolving logs with no message.
std::string eventCodeName(flatlogs::eventCodeT ec)
Base class for logs consisting of an empty message.
static int extract(messageT &msg, void *msgBuffer, flatlogs::msgLenT len)
Extract the message from a buffer – a no-op since it is an emptyMessage.
emptyMessage messageT
The type of the message.
static logMetaDetail getAccessor(const std::string &member)
Get an empty logMetaDetail because meta data doesn't make sense for this log.
static flatlogs::msgLenT length(const messageT &msg)
Get the length of the message.
static std::string msgJSON(void *msgBuffer, flatlogs::msgLenT len, const uint8_t *binarySchema, const unsigned int binarySchemaLength)
static int format(void *msgBuffer, const messageT &msg)
Format the buffer given a message – a no-op since the message is an emptyMessage.
static std::string msgString(void *msgBuffer, flatlogs::msgLenT len)
static bool verify(flatlogs::bufferPtrT &logBuff, flatlogs::msgLenT len)