GNU Radio Manual and C++ API Reference  3.7.9.2
The Free & Open Software Radio Ecosystem
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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)
 contructor 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_appender (std::string appender)
 inline function, Method to add appender to logger by name (define appender in conf file) More...
 
void set_appender (std::string appender)
 inline function, Method to set an appender to logger by name (define appender in conf file) 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

gr::logger::logger ( std::string  logger_name)
inline

contructor Provide name of logger to associate with this class

Parameters
logger_nameName of logger associated with class

References GR_LOG_ASSIGN_LOGPTR.

gr::logger::~logger ( )
inline

Destructor.

Member Function Documentation

void gr::logger::add_appender ( std::string  appender)
inline

inline function, Method to add appender to logger by name (define appender in conf file)

References GR_LOG_ADD_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.

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.

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

inline function, Method to add rolling file appender to logger

References GR_LOG_ADD_ROLLINGFILE_APPENDER.

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

inline function, wrapper for ALERT message

References GR_LOG_ALERT.

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

inline function, wrapper for NOTICE message

References GR_LOG_CRIT.

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

inline function, wrapper for LOG4CPP_DEBUG for DEBUG message

References GR_LOG_DEBUG.

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

inline function, wrapper for EMERG message

References GR_LOG_EMERG.

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

inline function, wrapper for LOG4CPP_ERROR for ERROR message

References GR_LOG_ERROR.

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

inline function, wrapper for LOG4CPP_ASSERT for conditional ERROR message

References GR_LOG_ERRORIF.

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

inline function, wrapper for FATAL message

References GR_LOG_FATAL.

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

inline function, wrapper to get the logger level

References GR_LOG_GET_LEVEL.

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

inline function, wrapper for LOG4CPP_INFO for INFO message

References GR_LOG_INFO.

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.

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

inline function, wrapper for NOTICE message

References GR_LOG_NOTICE.

void gr::logger::set_appender ( std::string  appender)
inline

inline function, Method to set an appender to logger by name (define appender in conf file)

References GR_LOG_SET_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.

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.

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

inline function, wrapper to set the logger level

References GR_LOG_SET_LEVEL.

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: