WPILibC++ 2024.3.2
wpi::Logger Class Reference

#include <wpi/Logger.h>

Public Types

using LogFunc = std::function< void(unsigned int level, const char *file, unsigned int line, const char *msg)>
 

Public Member Functions

 Logger ()=default
 
 Logger (LogFunc func)
 
 Logger (LogFunc func, unsigned int min_level)
 
void SetLogger (LogFunc func)
 
void set_min_level (unsigned int level)
 
unsigned int min_level () const
 
void DoLog (unsigned int level, const char *file, unsigned int line, const char *msg)
 
void LogV (unsigned int level, const char *file, unsigned int line, fmt::string_view format, fmt::format_args args)
 
template<typename... Args>
void Log (unsigned int level, const char *file, unsigned int line, fmt::string_view format, Args &&... args)
 
bool HasLogger () const
 

Member Typedef Documentation

◆ LogFunc

using wpi::Logger::LogFunc = std::function<void(unsigned int level, const char* file, unsigned int line, const char* msg)>

Constructor & Destructor Documentation

◆ Logger() [1/3]

wpi::Logger::Logger ( )
default

◆ Logger() [2/3]

wpi::Logger::Logger ( LogFunc  func)
inlineexplicit

◆ Logger() [3/3]

wpi::Logger::Logger ( LogFunc  func,
unsigned int  min_level 
)
inline

Member Function Documentation

◆ DoLog()

void wpi::Logger::DoLog ( unsigned int  level,
const char *  file,
unsigned int  line,
const char *  msg 
)

◆ HasLogger()

bool wpi::Logger::HasLogger ( ) const
inline

◆ Log()

template<typename... Args>
void wpi::Logger::Log ( unsigned int  level,
const char *  file,
unsigned int  line,
fmt::string_view  format,
Args &&...  args 
)
inline

◆ LogV()

void wpi::Logger::LogV ( unsigned int  level,
const char *  file,
unsigned int  line,
fmt::string_view  format,
fmt::format_args  args 
)

◆ min_level()

unsigned int wpi::Logger::min_level ( ) const
inline

◆ set_min_level()

void wpi::Logger::set_min_level ( unsigned int  level)
inline

◆ SetLogger()

void wpi::Logger::SetLogger ( LogFunc  func)
inline

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