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

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

#include <gnuradio/logger.h>

Public Member Functions

 logger (std::string logger_name)
 constructor Provide name of logger to associate with this class More...
 
 ~logger ()
 Destructor. More...
 
void set_level (std::string level)
 inline function, wrapper to set the logger level More...
 
void get_level (std::string &level)
 inline function, wrapper to get the logger level More...
 
void debug (std::string msg)
 inline function, wrapper for LOG4CPP_DEBUG for DEBUG message More...
 
void info (std::string msg)
 inline function, wrapper for LOG4CPP_INFO for INFO message More...
 
void notice (std::string msg)
 inline function, wrapper for NOTICE message More...
 
void warn (std::string msg)
 inline function, wrapper for LOG4CPP_WARN for WARN message More...
 
void error (std::string msg)
 inline function, wrapper for LOG4CPP_ERROR for ERROR message More...
 
void crit (std::string msg)
 inline function, wrapper for NOTICE message More...
 
void alert (std::string msg)
 inline function, wrapper for ALERT message More...
 
void fatal (std::string msg)
 inline function, wrapper for FATAL message More...
 
void emerg (std::string msg)
 inline function, wrapper for EMERG message More...
 
void errorIF (bool cond, std::string msg)
 inline function, wrapper for LOG4CPP_ASSERT for conditional ERROR message More...
 
void log_assert (bool cond, std::string msg)
 inline function, wrapper for LOG4CPP_ASSERT for conditional ERROR message More...
 
void add_console_appender (std::string target, std::string pattern)
 inline function, Method to add console appender to logger More...
 
void set_console_appender (std::string target, std::string pattern)
 inline function, Method to set a console appender to logger More...
 
void add_file_appender (std::string filename, bool append, std::string pattern)
 inline function, Method to add file appender to logger More...
 
void set_file_appender (std::string filename, bool append, std::string pattern)
 inline function, Method to set a file appender to logger More...
 
void add_rollingfile_appender (std::string filename, size_t filesize, int bkup_index, bool append, mode_t mode, std::string pattern)
 inline function, Method to add rolling file appender to logger More...
 

Detailed Description

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 ( std::string  logger_name)
inline

constructor Provide name of logger to associate with this class

Parameters
logger_nameName of logger associated with class

References GR_LOG_ASSIGN_LOGPTR.

◆ ~logger()

gr::logger::~logger ( )
inline

Destructor.

Member Function Documentation

◆ add_console_appender()

void gr::logger::add_console_appender ( std::string  target,
std::string  pattern 
)
inline

inline function, Method to add console appender to logger

References GR_LOG_ADD_CONSOLE_APPENDER.

◆ add_file_appender()

void gr::logger::add_file_appender ( std::string  filename,
bool  append,
std::string  pattern 
)
inline

inline function, Method to add file appender to logger

References GR_LOG_ADD_FILE_APPENDER.

◆ add_rollingfile_appender()

void gr::logger::add_rollingfile_appender ( std::string  filename,
size_t  filesize,
int  bkup_index,
bool  append,
mode_t  mode,
std::string  pattern 
)
inline

◆ alert()

void gr::logger::alert ( std::string  msg)
inline

inline function, wrapper for ALERT message

References GR_LOG_ALERT.

◆ crit()

void gr::logger::crit ( std::string  msg)
inline

inline function, wrapper for NOTICE message

References GR_LOG_CRIT.

◆ debug()

void gr::logger::debug ( std::string  msg)
inline

inline function, wrapper for LOG4CPP_DEBUG for DEBUG message

References GR_LOG_DEBUG.

◆ emerg()

void gr::logger::emerg ( std::string  msg)
inline

inline function, wrapper for EMERG message

References GR_LOG_EMERG.

◆ error()

void gr::logger::error ( std::string  msg)
inline

inline function, wrapper for LOG4CPP_ERROR for ERROR message

References GR_LOG_ERROR.

◆ errorIF()

void gr::logger::errorIF ( bool  cond,
std::string  msg 
)
inline

inline function, wrapper for LOG4CPP_ASSERT for conditional ERROR message

References GR_LOG_ERRORIF.

◆ fatal()

void gr::logger::fatal ( std::string  msg)
inline

inline function, wrapper for FATAL message

References GR_LOG_FATAL.

◆ get_level()

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

inline function, wrapper to get the logger level

References GR_LOG_GET_LEVEL.

◆ info()

void gr::logger::info ( std::string  msg)
inline

inline function, wrapper for LOG4CPP_INFO for INFO message

References GR_LOG_INFO.

◆ log_assert()

void gr::logger::log_assert ( bool  cond,
std::string  msg 
)
inline

inline function, wrapper for LOG4CPP_ASSERT for conditional ERROR message

References GR_LOG_ASSERT.

◆ notice()

void gr::logger::notice ( std::string  msg)
inline

inline function, wrapper for NOTICE message

References GR_LOG_NOTICE.

◆ set_console_appender()

void gr::logger::set_console_appender ( std::string  target,
std::string  pattern 
)
inline

inline function, Method to set a console appender to logger

References GR_LOG_SET_CONSOLE_APPENDER.

◆ set_file_appender()

void gr::logger::set_file_appender ( std::string  filename,
bool  append,
std::string  pattern 
)
inline

inline function, Method to set a file appender to logger

References GR_LOG_SET_FILE_APPENDER.

◆ set_level()

void gr::logger::set_level ( std::string  level)
inline

inline function, wrapper to set the logger level

References GR_LOG_SET_LEVEL.

◆ warn()

void gr::logger::warn ( std::string  msg)
inline

inline function, wrapper for LOG4CPP_WARN for WARN message

References GR_LOG_WARN.


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