GNU Radio Manual and C++ API Reference 3.10.5.1
The Free & Open Software Radio Ecosystem
gr::logger Class Reference

GR_LOG macros. More...

#include <gnuradio/logger.h>

Public Member Functions

 logger (const std::string &logger_name)
 constructor Provide name of logger to associate with this class More...
 
 ~logger ()=default
 Destructor. More...
 
void set_level (const std::string &level)
 inline function, wrapper to set the logger level More...
 
void set_level (const log_level level)
 
void get_level (std::string &level) const
 inline function, wrapper to get the logger level More...
 
const std::string get_string_level () const
 
log_level get_level () const
 
const std::string & name () const
 
void set_name (const std::string &name)
 
template<typename... Args>
void trace (const spdlog::string_view_t &msg, const Args &... args)
 inline function, wrapper for TRACE message More...
 
template<typename... Args>
void debug (const spdlog::string_view_t &msg, const Args &... args)
 inline function, wrapper for DEBUG message More...
 
template<typename... Args>
void info (const spdlog::string_view_t &msg, const Args &... args)
 inline function, wrapper for INFO message More...
 
template<typename... Args>
void notice (const spdlog::string_view_t &msg, const Args &... args)
 inline function, wrapper for INFO message, DEPRECATED More...
 
template<typename... Args>
void warn (const spdlog::string_view_t &msg, const Args &... args)
 inline function, wrapper for WARN message More...
 
template<typename... Args>
void error (const spdlog::string_view_t &msg, const Args &... args)
 inline function, wrapper for ERROR message More...
 
template<typename... Args>
void crit (const spdlog::string_view_t &msg, const Args &... args)
 inline function, wrapper for CRITICAL message More...
 
template<typename... Args>
void alert (const spdlog::string_view_t &msg, const Args &... args)
 inline function, wrapper for CRITICAL message, DEPRECATED More...
 
template<typename... Args>
void fatal (const spdlog::string_view_t &msg, const Args &... args)
 inline function, wrapper for CRITICAL message, DEPRECATED More...
 
template<typename... Args>
void emerg (const spdlog::string_view_t &msg, const Args &... args)
 inline function, wrapper for CRITICAL message, DEPRECATED More...
 

Public Attributes

underlying_logger_ptr d_logger
 

Detailed Description

GR_LOG macros.

These macros wrap the standard LOG4CPP_LEVEL macros. The available macros are: LOG_DEBUG LOG_INFO LOG_WARN LOG_TRACE LOG_ERROR LOG_ALERT LOG_CRIT LOG_FATAL LOG_EMERG

Logger class for referencing loggers in python. Not needed in C++ (use macros) Wraps and manipulates loggers for python as python has no macros

Constructor & Destructor Documentation

◆ logger()

gr::logger::logger ( const std::string &  logger_name)

constructor Provide name of logger to associate with this class

Parameters
logger_nameName of logger associated with class

Creates a new logger. Loggers inherit the logging level (through gr.prefs or through gr::logging::singleton().set_default_level()) that is set at the time of their creation.

◆ ~logger()

gr::logger::~logger ( )
default

Destructor.

Member Function Documentation

◆ alert()

template<typename... Args>
void gr::logger::alert ( const spdlog::string_view_t &  msg,
const Args &...  args 
)
inline

inline function, wrapper for CRITICAL message, DEPRECATED

References gr::msgport_names::msg().

◆ crit()

template<typename... Args>
void gr::logger::crit ( const spdlog::string_view_t &  msg,
const Args &...  args 
)
inline

inline function, wrapper for CRITICAL message

References gr::msgport_names::msg().

◆ debug()

template<typename... Args>
void gr::logger::debug ( const spdlog::string_view_t &  msg,
const Args &...  args 
)
inline

inline function, wrapper for DEBUG message

References gr::msgport_names::msg().

◆ emerg()

template<typename... Args>
void gr::logger::emerg ( const spdlog::string_view_t &  msg,
const Args &...  args 
)
inline

inline function, wrapper for CRITICAL message, DEPRECATED

References gr::msgport_names::msg().

◆ error()

template<typename... Args>
void gr::logger::error ( const spdlog::string_view_t &  msg,
const Args &...  args 
)
inline

inline function, wrapper for ERROR message

References gr::msgport_names::msg().

◆ fatal()

template<typename... Args>
void gr::logger::fatal ( const spdlog::string_view_t &  msg,
const Args &...  args 
)
inline

inline function, wrapper for CRITICAL message, DEPRECATED

References gr::msgport_names::msg().

◆ get_level() [1/2]

log_level gr::logger::get_level ( ) const

◆ get_level() [2/2]

void gr::logger::get_level ( std::string &  level) const

inline function, wrapper to get the logger level

◆ get_string_level()

const std::string gr::logger::get_string_level ( ) const

◆ info()

template<typename... Args>
void gr::logger::info ( const spdlog::string_view_t &  msg,
const Args &...  args 
)
inline

inline function, wrapper for INFO message

References gr::msgport_names::msg().

◆ name()

const std::string & gr::logger::name ( ) const

◆ notice()

template<typename... Args>
void gr::logger::notice ( const spdlog::string_view_t &  msg,
const Args &...  args 
)
inline

inline function, wrapper for INFO message, DEPRECATED

References gr::msgport_names::msg().

◆ set_level() [1/2]

void gr::logger::set_level ( const log_level  level)

◆ set_level() [2/2]

void gr::logger::set_level ( const std::string &  level)

inline function, wrapper to set the logger level

◆ set_name()

void gr::logger::set_name ( const std::string &  name)

◆ trace()

template<typename... Args>
void gr::logger::trace ( const spdlog::string_view_t &  msg,
const Args &...  args 
)
inline

inline function, wrapper for TRACE message

References gr::msgport_names::msg().

◆ warn()

template<typename... Args>
void gr::logger::warn ( const spdlog::string_view_t &  msg,
const Args &...  args 
)
inline

inline function, wrapper for WARN message

References gr::msgport_names::msg().

Member Data Documentation

◆ d_logger

underlying_logger_ptr gr::logger::d_logger

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