API
 
Loading...
Searching...
No Matches
MagAOX::logger::software_alert Struct Reference

Software ALERT log entry. More...

#include <software_log.hpp>

Inheritance diagram for MagAOX::logger::software_alert:
Inheritance graph
Collaboration diagram for MagAOX::logger::software_alert:
Collaboration graph

Static Public Member Functions

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.
 
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 fbMessage &msg)
 Get the length of the message.
 
static int format (void *msgBuffer, const fbMessage &msg)
 Format the buffer given the input message.
 
static std::string msgJSON (void *msgBuffer, flatlogs::msgLenT len, const uint8_t *binarySchema, const unsigned int binarySchemaLength)
 

Static Public Attributes

static const flatlogs::logPrioT defaultLevel = flatlogs::logPrio::LOG_ALERT
 The default level.
 
static const flatlogs::eventCodeT eventCode = eventCodes::SOFTWARE_LOG
 The event code.
 

Detailed Description

Software ALERT log entry.

This should only be used for a system-wide emergency requiring operator or automatic action. Not for a process specific problem.

Definition at line 332 of file software_log.hpp.

Member Function Documentation

◆ format()

static int MagAOX::logger::flatbuffer_log::format ( void *  msgBuffer,
const fbMessage msg 
)
inlinestaticinherited

Format the buffer given the input message.

Todo:
this is an unneccesary memcpy from the FlatBufferBuilder, we need to figure out how to not do this.
Parameters
[out]msgBufferthe buffer, must be pre-allocated to size length(msg)
[in]msgthe message which contains a flatbuffer builder, from which the data are memcpy-ed.

Definition at line 54 of file flatbuffer_log.hpp.

◆ getAccessor()

static logMetaDetail MagAOX::logger::software_log::getAccessor ( const std::string &  member)
inlinestaticinherited

Get an empty logMetaDetail because meta data doesn't make sense for this log.

Returns
an empty logMetaDetail
Parameters
[in]memberthe name of the member

Definition at line 305 of file software_log.hpp.

Referenced by MagAOX::logger::logMemberAccessor(), and libXWCTest::loggerTest::logTypeAccessorTest::TEST_CASE().

◆ length()

static flatlogs::msgLenT MagAOX::logger::flatbuffer_log::length ( const fbMessage msg)
inlinestaticinherited

Get the length of the message.

Parameters
[in]msgthe fbMessage type holding a FlatBufferBuilder

Definition at line 46 of file flatbuffer_log.hpp.

◆ msgJSON()

static std::string MagAOX::logger::flatbuffer_log::msgJSON ( void *  msgBuffer,
flatlogs::msgLenT  len,
const uint8_t *  binarySchema,
const unsigned int  binarySchemaLength 
)
inlinestaticinherited
Parameters
[in]msgBufferBuffer containing the flatbuffer serialized message.
[in]len[unused] length of msgBuffer.
[in]binarySchemaflatbuffers binary schema for this log type
[in]binarySchemaLengthflatbuffers binary schema length

Definition at line 65 of file flatbuffer_log.hpp.

◆ msgString()

static std::string MagAOX::logger::software_log::msgString ( void *  msgBuffer,
flatlogs::msgLenT  len 
)
inlinestaticinherited

Get the message formatted for human consumption.

Parameters
[in]msgBufferBuffer containing the flatbuffer serialized message.
[in]len[unused] length of msgBuffer.

Definition at line 260 of file software_log.hpp.

References MagAOX::logger::GetSoftware_log_fb().

◆ verify()

static bool MagAOX::logger::software_log::verify ( flatlogs::bufferPtrT logBuff,
flatlogs::msgLenT  len 
)
inlinestaticinherited
Parameters
[in]logBuffBuffer containing the flatbuffer serialized message.
[in]lenlength of msgBuffer.

Definition at line 250 of file software_log.hpp.

References flatlogs::logHeader::messageBuffer(), and MagAOX::logger::VerifySoftware_log_fbBuffer().

Referenced by MagAOX::logger::logVerify().

Member Data Documentation

◆ defaultLevel

const flatlogs::logPrioT MagAOX::logger::software_alert::defaultLevel = flatlogs::logPrio::LOG_ALERT
static

The default level.

Definition at line 335 of file software_log.hpp.

◆ eventCode

const flatlogs::eventCodeT MagAOX::logger::software_log::eventCode = eventCodes::SOFTWARE_LOG
staticinherited

The event code.

Definition at line 35 of file software_log.hpp.


The documentation for this struct was generated from the following file: