Bitcoin Core 32.99.0
P2P Digital Currency
Classes | Typedefs | Enumerations | Functions | Variables
util::log Namespace Reference

Classes

struct  Entry
 
struct  NoRateLimitTag
 Structure and constant for tagging not to rate limit. More...
 

Typedefs

using Category = uint64_t
 Opaque to util::log; interpreted by consumers (e.g., BCLog::LogFlags). More...
 

Enumerations

enum class  Level {
  Trace = 0 , Debug , Info , Warning ,
  Error
}
 

Functions

bool ShouldDebugLog (Category category)
 Return whether messages with specified category should be debug logged. More...
 
bool ShouldTraceLog (Category category)
 Return whether messages with specified category should be trace logged. More...
 
void Log (Entry entry)
 Send message to be logged. More...
 
template<typename... Args>
void LogPrintFormatInternal_ (SourceLocation &&source_loc, BCLog::LogFlags flag, util::log::Level level, bool should_ratelimit, util::ConstevalFormatString< sizeof...(Args)> fmt, const Args &... args)
 
template<typename... Args>
void LogPrintFormatInternal (SourceLocation &&source_loc, BCLog::LogFlags flag, util::log::Level level, util::ConstevalFormatString< sizeof...(Args)> fmt, const Args &... args)
 
template<typename... Args>
void LogPrintFormatInternal (SourceLocation &&source_loc, BCLog::LogFlags flag, util::log::Level level, util::log::NoRateLimitTag, util::ConstevalFormatString< sizeof...(Args)> fmt, const Args &... args)
 

Variables

constexpr NoRateLimitTag NO_RATE_LIMIT {}
 

Typedef Documentation

◆ Category

using util::log::Category = typedef uint64_t

Opaque to util::log; interpreted by consumers (e.g., BCLog::LogFlags).

Definition at line 45 of file log.h.

Enumeration Type Documentation

◆ Level

enum class util::log::Level
strong
Enumerator
Trace 
Debug 
Info 
Warning 
Error 

Definition at line 53 of file log.h.

Function Documentation

◆ Log()

void util::log::Log ( Entry  entry)

Send message to be logged.

Applications using the logging library need to provide this.

Definition at line 987 of file bitcoinkernel.cpp.

Here is the caller graph for this function:

◆ LogPrintFormatInternal() [1/2]

template<typename... Args>
void util::log::LogPrintFormatInternal ( SourceLocation &&  source_loc,
BCLog::LogFlags  flag,
util::log::Level  level,
util::ConstevalFormatString< sizeof...(Args)>  fmt,
const Args &...  args 
)
inline

Definition at line 101 of file log.h.

Here is the call graph for this function:

◆ LogPrintFormatInternal() [2/2]

template<typename... Args>
void util::log::LogPrintFormatInternal ( SourceLocation &&  source_loc,
BCLog::LogFlags  flag,
util::log::Level  level,
util::log::NoRateLimitTag  ,
util::ConstevalFormatString< sizeof...(Args)>  fmt,
const Args &...  args 
)
inline

Definition at line 107 of file log.h.

Here is the call graph for this function:

◆ LogPrintFormatInternal_()

template<typename... Args>
void util::log::LogPrintFormatInternal_ ( SourceLocation &&  source_loc,
BCLog::LogFlags  flag,
util::log::Level  level,
bool  should_ratelimit,
util::ConstevalFormatString< sizeof...(Args)>  fmt,
const Args &...  args 
)
inline

Definition at line 84 of file log.h.

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

◆ ShouldDebugLog()

bool util::log::ShouldDebugLog ( Category  category)

Return whether messages with specified category should be debug logged.

Applications using the logging library need to provide this.

Definition at line 977 of file bitcoinkernel.cpp.

Here is the caller graph for this function:

◆ ShouldTraceLog()

bool util::log::ShouldTraceLog ( Category  category)

Return whether messages with specified category should be trace logged.

Applications using the logging library need to provide this.

Definition at line 982 of file bitcoinkernel.cpp.

Here is the caller graph for this function:

Variable Documentation

◆ NO_RATE_LIMIT

constexpr NoRateLimitTag util::log::NO_RATE_LIMIT {}
inlineconstexpr

Definition at line 51 of file log.h.