ADTF  3.18.2
cTestLogger::tMessages

Utility class that allows filtering of and searching for messages. More...

Inheritance diagram for cTestLogger::tMessages:
[legend]

Public Member Functions

tMessages Filter (uint8_t nLogLevel)
 
tMessages Filter (const std::string &strContent)
 
tMessages Filter (const std::regex &strPattern, bool bPartialMatch=true)
 
tMessages FilterSource (const std::string &strContent)
 
tMessages FilterSource (const std::regex &strPattern, bool bPartialMatch=true)
 
bool ContainsMessage (const std::string &strContent)
 
bool ContainsMessage (const std::regex &strPattern, bool bPartialMatch=true)
 
tMessage FindMessage (const std::string &strContent)
 Find a message that contains the given string. More...
 
tMessage FindMessage (const std::regex &strPattern, bool bPartialMatch=true)
 Find a message that matches the given pattern. More...
 

Detailed Description

Utility class that allows filtering of and searching for messages.

Definition at line 45 of file test_logger.h.

Member Function Documentation

◆ ContainsMessage() [1/2]

bool ContainsMessage ( const std::regex &  strPattern,
bool  bPartialMatch = true 
)
Parameters
[in]strPatternThe pattern to match.
[in]bPartialMatchWhether or not match the whole string or only parts.
Returns
Whether there is a message that matches the given pattern or not.

◆ ContainsMessage() [2/2]

bool ContainsMessage ( const std::string &  strContent)
Parameters
[in]strContentThe string to look for.
Returns
Whether there is a message that contains the given string or not.

◆ Filter() [1/3]

tMessages Filter ( const std::regex &  strPattern,
bool  bPartialMatch = true 
)
Parameters
[in]strPatternThe pattern to match.
[in]bPartialMatchWhether or not match the whole string or only parts.
Returns
All messages that match the pattern.

◆ Filter() [2/3]

tMessages Filter ( const std::string &  strContent)
Parameters
[in]strContentThe string to look for.
Returns
All messages that contain the given string.

◆ Filter() [3/3]

tMessages Filter ( uint8_t  nLogLevel)
Parameters
[in]nLogLevelThe log level to look for, see adtf::util::log::tLogLevel
Returns
All messages with the given log level.

◆ FilterSource() [1/2]

tMessages FilterSource ( const std::regex &  strPattern,
bool  bPartialMatch = true 
)
Parameters
[in]strPatternThe pattern to match.
[in]bPartialMatchWhether or not match the whole string or only parts.
Returns
All messages of which the source matchs the pattern.

◆ FilterSource() [2/2]

tMessages FilterSource ( const std::string &  strContent)
Parameters
[in]strContentThe string to look for.
Returns
All messages of which the source contains the given string.

◆ FindMessage() [1/2]

tMessage FindMessage ( const std::regex &  strPattern,
bool  bPartialMatch = true 
)

Find a message that matches the given pattern.

Parameters
[in]strPatternThe pattern to match.
[in]bPartialMatchWhether or not match the whole string or only parts.
Returns
The first message that matches.

◆ FindMessage() [2/2]

tMessage FindMessage ( const std::string &  strContent)

Find a message that contains the given string.

Parameters
[in]strContentThe string to look for.
Returns
The first message that contains the string.