Motion Master
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
InternalLogger Struct Reference

Logging class. More...

#include <global.h>

Public Member Functions

void log (const loguru::Message &message)
 Callback from loguru. More...
 
void setAssertEqCallback (void(*func)(const std::string &pre, const std::string &str1, const std::string &str2, void *userData, int &retval))
 
void pushAssertEq (const std::string &str, void *userData=nullptr)
 
void setPop ()
 
void clearPop ()
 
void resetState ()
 

Static Public Member Functions

static InternalLoggergetInstance (const std::string &name)
 
static void setType (const std::string &name, uint32_t type)
 
static std::string & get_log (const std::string &name)
 
static void log_to_internal_log (void *user_data, const loguru::Message &message)
 

Public Attributes

std::string g_internal_log
 
std::string g_internal_log_copy
 
std::vector< std::string > logPreVec
 
std::vector< std::string > logMsgVec
 
std::vector< std::string > logIndVec
 
std::deque< std::string > assertEqStrQue
 
std::deque< void * > assertEqUserDataQue
 
bool m_pop
 
void(* assertEqCallback )(const std::string &pre, const std::string &str1, const std::string &str2, void *userData, int &retval)
 

Detailed Description

Logging class.

Member Function Documentation

◆ clearPop()

void InternalLogger::clearPop ( )
inline

◆ get_log()

static std::string & InternalLogger::get_log ( const std::string &  name)
inlinestatic

Make a copy from the internal log before returning ref to the log string

◆ getInstance()

static InternalLogger * InternalLogger::getInstance ( const std::string &  name)
inlinestatic

Get instance (or create one if it doesn't exist, and then get instance)

◆ log()

void InternalLogger::log ( const loguru::Message &  message)
inline

Callback from loguru.

There are two types of logging: type=0 : Concat strings as they come type=1 : Push strings in vectors and use callback for checking if string is equal to other string (used for testing).

Parameters
messagefrom loguru

◆ log_to_internal_log()

static void InternalLogger::log_to_internal_log ( void *  user_data,
const loguru::Message &  message 
)
inlinestatic

Logging function

◆ pushAssertEq()

void InternalLogger::pushAssertEq ( const std::string &  str,
void *  userData = nullptr 
)
inline

Set compare string and optionaly user data

◆ resetState()

void InternalLogger::resetState ( )
inline

◆ setAssertEqCallback()

void InternalLogger::setAssertEqCallback ( void(*)(const std::string &pre, const std::string &str1, const std::string &str2, void *userData, int &retval)  func)
inline

Callback after log

◆ setPop()

void InternalLogger::setPop ( )
inline

◆ setType()

static void InternalLogger::setType ( const std::string &  name,
uint32_t  type 
)
inlinestatic

Member Data Documentation

◆ assertEqCallback

void(* InternalLogger::assertEqCallback) (const std::string &pre, const std::string &str1, const std::string &str2, void *userData, int &retval)

User's callback (used when logging from different threads)

◆ assertEqStrQue

std::deque<std::string> InternalLogger::assertEqStrQue

String that gets compared with the latest message from the log message vector

◆ assertEqUserDataQue

std::deque<void*> InternalLogger::assertEqUserDataQue

◆ g_internal_log

std::string InternalLogger::g_internal_log

◆ g_internal_log_copy

std::string InternalLogger::g_internal_log_copy

◆ logIndVec

std::vector<std::string> InternalLogger::logIndVec

Log indent vector

◆ logMsgVec

std::vector<std::string> InternalLogger::logMsgVec

Log message vector

◆ logPreVec

std::vector<std::string> InternalLogger::logPreVec

Log preamble vector

◆ m_pop

bool InternalLogger::m_pop

Should we pop values from the queues or not (default: true)


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