Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
DebugLogHelper Class Reference

#include <logging.h>

Public Types

using MatchFn = std::function<bool(const std::string* line)>

Public Member Functions

 DebugLogHelper (std::string message, MatchFn match=[](const std::string *){ return true;})
 DebugLogHelper (const DebugLogHelper &)=delete
DebugLogHelperoperator= (const DebugLogHelper &)=delete
 ~DebugLogHelper ()

Private Attributes

const std::string m_message
bool m_found {false}
std::list< std::function< void(conststd::string &)> >::iterator m_print_connection
MatchFn m_match

Detailed Description

Definition at line 14 of file logging.h.

Member Typedef Documentation

◆ MatchFn

using DebugLogHelper::MatchFn = std::function<bool(const std::string* line)>

Custom match checking function.

Invoked with pointers to lines containing matching strings, and with null if check_found() is called without any successful match.

Can return true to enable default DebugLogHelper behavior of: (1) ending search after first successful match, and (2) raising an error in check_found if no match was found Can return false to do the opposite in either case.

Definition at line 26 of file logging.h.

Constructor & Destructor Documentation

◆ DebugLogHelper() [1/2]

DebugLogHelper::DebugLogHelper ( std::string message,
MatchFn match = [](const std::string*){ return true; } )
explicit

Definition at line 14 of file logging.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DebugLogHelper() [2/2]

DebugLogHelper::DebugLogHelper ( const DebugLogHelper & )
delete
Here is the call graph for this function:

◆ ~DebugLogHelper()

DebugLogHelper::~DebugLogHelper ( )

Definition at line 25 of file logging.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ operator=()

DebugLogHelper & DebugLogHelper::operator= ( const DebugLogHelper & )
delete
Here is the call graph for this function:

Member Data Documentation

◆ m_found

bool DebugLogHelper::m_found {false}
private

Definition at line 37 of file logging.h.

◆ m_match

MatchFn DebugLogHelper::m_match
private

Definition at line 39 of file logging.h.

◆ m_message

const std::string DebugLogHelper::m_message
private

Definition at line 36 of file logging.h.

◆ m_print_connection

std::list<std::function<void(conststd::string&)>>::iterator DebugLogHelper::m_print_connection
private

Definition at line 38 of file logging.h.


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