Modules | |
The log priorities | |
The flatlogs timestamp | |
Classes | |
class | flatlogs::logHeader |
The log entry header. More... | |
Typedefs | |
typedef std::shared_ptr< char > | flatlogs::bufferPtrT |
The log entry buffer smart pointer. More... | |
Functions | |
static int | flatlogs::logHeader::logLevel (bufferPtrT &logBuffer, const logPrioT &lvl) |
Set the level of a log entry in a logBuffer header. More... | |
static logPrioT | flatlogs::logHeader::logLevel (bufferPtrT &logBuffer) |
Extract the level of a log entry. More... | |
static logPrioT | flatlogs::logHeader::logLevel (char *logBuffer) |
Extract the level of a log entry. More... | |
static int | flatlogs::logHeader::eventCode (bufferPtrT &logBuffer, const eventCodeT &ec) |
Set the event code of a log entry. More... | |
static eventCodeT | flatlogs::logHeader::eventCode (bufferPtrT &logBuffer) |
Extract the event code of a log entry. More... | |
static eventCodeT | flatlogs::logHeader::eventCode (char *logBuffer) |
Extract the event code of a log entry. More... | |
static int | flatlogs::logHeader::timespec (bufferPtrT &logBuffer, const timespecX &ts) |
Set the timespec of a log entry. More... | |
static timespecX | flatlogs::logHeader::timespec (bufferPtrT &logBuffer) |
Extract the timespec of a log entry. More... | |
static timespecX | flatlogs::logHeader::timespec (char *logBuffer) |
Extract the timespec of a log entry. More... | |
static size_t | flatlogs::logHeader::lenSize (bufferPtrT &logBuffer) |
Get the size in bytes of the length field for an existing logBuffer. More... | |
static size_t | flatlogs::logHeader::lenSize (char *logBuffer) |
Get the size in bytes of the length field for an existing logBuffer. More... | |
static size_t | flatlogs::logHeader::lenSize (msgLenT &msgSz) |
Get the size in bytes of the length field for a logBuffer given the intended message length. More... | |
static int | flatlogs::logHeader::msgLen (bufferPtrT &logBuffer, const msgLenT &msgLen) |
Set the message length of a log entry message. More... | |
static msgLen0T | flatlogs::logHeader::msgLen0 (bufferPtrT &logBuffer) |
Extract the short message length of a log entry message. More... | |
static msgLen0T | flatlogs::logHeader::msgLen0 (char *logBuffer) |
Extract the short message length of a log entry message. More... | |
static msgLen1T | flatlogs::logHeader::msgLen1 (bufferPtrT &logBuffer) |
Extract the medium message length of a log entry message. More... | |
static msgLen1T | flatlogs::logHeader::msgLen1 (char *logBuffer) |
Extract the medium message length of a log entry message. More... | |
static msgLenT | flatlogs::logHeader::msgLen (bufferPtrT &logBuffer) |
Extract the message length of a log entry message. More... | |
static msgLenT | flatlogs::logHeader::msgLen (char *logBuffer) |
Extract the message length of a log entry message. More... | |
static size_t | flatlogs::logHeader::headerSize (bufferPtrT &logBuffer) |
Get the size of the header, including the variable size length field, for an existing logBuffer. More... | |
static size_t | flatlogs::logHeader::headerSize (char *logBuffer) |
Get the size of the header, including the variable size length field, for an existing logBuffer. More... | |
static size_t | flatlogs::logHeader::headerSize (msgLenT &msgSz) |
Get the size of the header, including the variable size length field, given a message size. More... | |
static size_t | flatlogs::logHeader::totalSize (bufferPtrT &logBuffer) |
Get the total size of the log entry, including the message buffer. More... | |
static size_t | flatlogs::logHeader::totalSize (char *logBuffer) |
Get the total size of the log entry, including the message buffer. More... | |
static size_t | flatlogs::logHeader::totalSize (msgLenT &msgSz) |
Get the total size of a log entry, given the message buffer size. More... | |
static void * | flatlogs::logHeader::messageBuffer (bufferPtrT &logBuffer) |
Get the message buffer address. More... | |
static void * | flatlogs::logHeader::messageBuffer (char *logBuffer) |
Get the message buffer address. More... | |
static int | flatlogs::logHeader::extractBasicLog (logPrioT &lvl, eventCodeT &ec, timespecX &ts, msgLenT &len, bufferPtrT &logBuffer) |
Extract the basic details of a log entry. More... | |
static int | flatlogs::logHeader::extractBasicLog (logPrioT &lvl, eventCodeT &ec, timespecX &ts, msgLenT &len, char *logBuffer) |
Extract the basic details of a log entry. More... | |
typedef std::shared_ptr<char> flatlogs::bufferPtrT |
The log entry buffer smart pointer.
Definition at line 58 of file logHeader.hpp.
|
inlinestatic |
Extract the event code of a log entry.
[in] | logBuffer | a shared_ptr<char> containing a raw log entry buffer. |
Definition at line 422 of file logHeader.hpp.
|
inlinestatic |
Set the event code of a log entry.
[in,out] | logBuffer | a shared_ptr<char> containing a raw log entry buffer. |
[in] | ec | the new event code. |
Definition at line 412 of file logHeader.hpp.
Referenced by flatlogs::logHeader::createLog(), flatlogs::logHeader::eventCode(), flatlogs::logHeader::extractBasicLog(), MagAOX::logger::logMap::getNextLog(), and MagAOX::logger::logMap::getPriorLog().
|
inlinestatic |
Extract the event code of a log entry.
[in] | logBuffer | a pointer a raw log entry buffer. |
Definition at line 429 of file logHeader.hpp.
|
inlinestatic |
Extract the basic details of a log entry.
Convenience wrapper for the other extraction functions.
[out] | lvl | The log level |
[out] | ec | the event code |
[out] | ts | the timestamp of the log entry |
[out] | len | the message length |
[in] | logBuffer | a shared_ptr<char> containing a raw log entry buffer. |
Definition at line 667 of file logHeader.hpp.
Referenced by flatlogs::jsonFormat(), flatlogs::minFormat(), flatlogs::stdFormat(), and flatlogs::stdShortFormat().
|
inlinestatic |
Extract the basic details of a log entry.
Convenience wrapper for the other extraction functions.
[out] | lvl | The log level |
[out] | ec | the event code |
[out] | ts | the timestamp of the log entry |
[out] | len | the message length |
[in] | logBuffer | a pointer to a raw log entry buffer. |
Definition at line 687 of file logHeader.hpp.
|
inlinestatic |
Get the size of the header, including the variable size length field, for an existing logBuffer.
[in] | logBuffer | a shared_ptr<char> containing a raw log entry buffer. |
Definition at line 499 of file logHeader.hpp.
Referenced by flatlogs::logHeader::messageBuffer(), and flatlogs::logHeader::totalSize().
|
inlinestatic |
Get the size of the header, including the variable size length field, for an existing logBuffer.
[in] | logBuffer | a pointer to a raw log entry buffer. |
Definition at line 506 of file logHeader.hpp.
|
inlinestatic |
Get the size of the header, including the variable size length field, given a message size.
[in] | msgSz | the size of the intended message. |
Definition at line 512 of file logHeader.hpp.
|
inlinestatic |
Get the size in bytes of the length field for an existing logBuffer.
[in] | logBuffer | a shared_ptr<char> containing a raw log entry buffer. |
Definition at line 458 of file logHeader.hpp.
Referenced by flatlogs::logHeader::headerSize().
|
inlinestatic |
Get the size in bytes of the length field for an existing logBuffer.
[in] | logBuffer | a pointer to a raw log entry buffer. |
Definition at line 474 of file logHeader.hpp.
|
inlinestatic |
Get the size in bytes of the length field for a logBuffer given the intended message length.
[in] | msgSz | the size of the intended message. |
Definition at line 489 of file logHeader.hpp.
|
inlinestatic |
Extract the level of a log entry.
[in] | logBuffer | a shared_ptr<char> containing a raw log entry buffer. |
Definition at line 398 of file logHeader.hpp.
|
inlinestatic |
Set the level of a log entry in a logBuffer header.
logBuffer | [in/out] a shared_ptr<char> containing a raw log entry buffer. | |
[in] | lvl | the new log level. |
Definition at line 388 of file logHeader.hpp.
Referenced by flatlogs::logHeader::createLog(), flatlogs::logHeader::extractBasicLog(), flatlogs::logHeader::logLevel(), and MagAOX::logger::logManager< _parentT, _logFileT >::logThreadExec().
|
inlinestatic |
Extract the level of a log entry.
[in] | logBuffer | a pointer to a raw log entry buffer. |
Definition at line 406 of file logHeader.hpp.
|
inlinestatic |
Get the message buffer address.
[in] | logBuffer | a shared_ptr<char> containing a raw log entry buffer. |
Definition at line 621 of file logHeader.hpp.
Referenced by flatlogs::logHeader::createLog(), MagAOX::logger::telem_cooler::getDouble(), MagAOX::logger::getLogContVal(), MagAOX::logger::getLogStateVal(), flatlogs::jsonFormat(), flatlogs::minFormat(), flatlogs::stdFormat(), flatlogs::stdShortFormat(), MagAOX::logger::config_log::verify(), MagAOX::logger::git_state::verify(), MagAOX::logger::observer::verify(), MagAOX::logger::ocam_temps::verify(), MagAOX::logger::outlet_channel_state::verify(), MagAOX::logger::outlet_state::verify(), MagAOX::logger::pico_channel::verify(), MagAOX::logger::saving_state_change::verify(), MagAOX::logger::software_log::verify(), MagAOX::logger::state_change::verify(), MagAOX::logger::string_log::verify(), MagAOX::logger::telem_blockgains::verify(), MagAOX::logger::telem_chrony_stats::verify(), MagAOX::logger::telem_chrony_status::verify(), MagAOX::logger::telem_cooler::verify(), MagAOX::logger::telem_coreloads::verify(), MagAOX::logger::telem_coretemps::verify(), MagAOX::logger::telem_dmmodes::verify(), MagAOX::logger::telem_dmspeck::verify(), MagAOX::logger::telem_drivetemps::verify(), MagAOX::logger::telem_fgtimings::verify(), MagAOX::logger::telem_fxngen::verify(), MagAOX::logger::telem_loopgain::verify(), MagAOX::logger::telem_observer::verify(), MagAOX::logger::telem_pi335::verify(), MagAOX::logger::telem_pico::verify(), MagAOX::logger::telem_pokecenter::verify(), MagAOX::logger::telem_pokeloop::verify(), MagAOX::logger::telem_position::verify(), MagAOX::logger::telem_rhusb::verify(), MagAOX::logger::telem_saving::verify(), MagAOX::logger::telem_sparkleclock::verify(), MagAOX::logger::telem_stage::verify(), MagAOX::logger::telem_stdcam::verify(), MagAOX::logger::telem_telcat::verify(), MagAOX::logger::telem_teldata::verify(), MagAOX::logger::telem_telenv::verify(), MagAOX::logger::telem_telpos::verify(), MagAOX::logger::telem_telsee::verify(), MagAOX::logger::telem_telvane::verify(), MagAOX::logger::telem_temps::verify(), MagAOX::logger::telem_usage::verify(), MagAOX::logger::telem_zaber::verify(), MagAOX::logger::ttmmod_params::verify(), and MagAOX::logger::user_log::verify().
|
inlinestatic |
Get the message buffer address.
[in] | logBuffer | a pointer to a raw log entry buffer. |
Definition at line 628 of file logHeader.hpp.
|
inlinestatic |
Extract the message length of a log entry message.
[in] | logBuffer | a shared_ptr<char> containing a raw log entry buffer. |
Definition at line 569 of file logHeader.hpp.
|
inlinestatic |
Set the message length of a log entry message.
[out] | logBuffer | a shared_ptr<char> containing a raw log entry buffer allocated with large enough header for this message length. |
[in] | msgLen | the message length to set. |
Definition at line 518 of file logHeader.hpp.
Referenced by flatlogs::logHeader::createLog(), flatlogs::logHeader::extractBasicLog(), flatlogs::logHeader::msgLen(), and flatlogs::logHeader::totalSize().
|
inlinestatic |
Extract the message length of a log entry message.
[in] | logBuffer | a pointer to a raw log entry buffer. |
Definition at line 585 of file logHeader.hpp.
|
inlinestatic |
Extract the short message length of a log entry message.
This is always safe on a minimally allocated logBuffer, can be used to test for progressive reading.
[in] | logBuffer | a shared_ptr<char> containing a raw log entry buffer. |
Definition at line 543 of file logHeader.hpp.
Referenced by flatlogs::logHeader::lenSize(), flatlogs::logHeader::msgLen(), and flatlogs::logHeader::msgLen0().
|
inlinestatic |
Extract the short message length of a log entry message.
This is always safe on a minimally allocated logBuffer, can be used to test for progressive reading.
[in] | logBuffer | a pointer to a raw log entry buffer. |
Definition at line 550 of file logHeader.hpp.
|
inlinestatic |
Extract the medium message length of a log entry message.
This is NOT always safe, and should only be caled if msgLen0 is 0xFE. Can be used to test for progressive reading.
[in] | logBuffer | a shared_ptr<char> containing a raw log entry buffer. |
Definition at line 556 of file logHeader.hpp.
Referenced by flatlogs::logHeader::msgLen(), and flatlogs::logHeader::msgLen1().
|
inlinestatic |
Extract the medium message length of a log entry message.
This is NOT always safe, and should only be caled if msgLen0 is 0xFE. Can be used to test for progressive reading.
[in] | logBuffer | a pointer to a raw log entry buffer. |
Definition at line 563 of file logHeader.hpp.
|
inlinestatic |
Extract the timespec of a log entry.
[in] | logBuffer | a shared_ptr<char> containing a raw log entry buffer. |
Definition at line 445 of file logHeader.hpp.
|
inlinestatic |
Set the timespec of a log entry.
[in,out] | logBuffer | a shared_ptr<char> containing a raw log entry buffer.*/ |
[in] | ts | the new timespec |
Definition at line 435 of file logHeader.hpp.
Referenced by flatlogs::logHeader::createLog(), flatlogs::logHeader::extractBasicLog(), MagAOX::logger::getLogContVal(), MagAOX::logger::getLogStateVal(), MagAOX::logger::logMap::getPriorLog(), MagAOX::logger::logInMemory::loadFile(), flatlogs::logHeader::timespec(), and MagAOX::logger::logFileRaw::writeLog().
|
inlinestatic |
Extract the timespec of a log entry.
[in] | logBuffer | a pointer to a raw log entry buffer. |
Definition at line 452 of file logHeader.hpp.
|
inlinestatic |
Get the total size of the log entry, including the message buffer.
[in] | logBuffer | a shared_ptr<char> containing a raw log entry buffer. |
Definition at line 602 of file logHeader.hpp.
Referenced by flatlogs::logHeader::createLog(), MagAOX::logger::logMap::getNextLog(), MagAOX::logger::logMap::getPriorLog(), MagAOX::logger::logInMemory::loadFile(), and MagAOX::logger::logFileRaw::writeLog().
|
inlinestatic |
Get the total size of the log entry, including the message buffer.
[in] | logBuffer | a pointer to a raw log entry buffer. |
Definition at line 609 of file logHeader.hpp.
|
inlinestatic |
Get the total size of a log entry, given the message buffer size.
[in] | msgSz | the intended size of the message buffer. |
Definition at line 615 of file logHeader.hpp.