#include <sys/types.h>
#include <gnuradio/api.h>
#include <assert.h>
#include <iostream>
#include <time.h>
#include <boost/filesystem.hpp>
#include <boost/thread.hpp>
#include <boost/format.hpp>
#include <pmt/pmt.h>
Go to the source code of this file.
Classes | |
class | gr::logger |
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... | |
Namespaces | |
gr | |
Include this header to use the message passing features. | |
Macros | |
#define | ENABLE_GR_LOG |
GNU Radio logging wrapper for log4cpp library (C++ port of log4j) More... | |
#define | HAVE_LOG4CPP |
#define | GR_LOG_DECLARE_LOGPTR(logger) |
#define | GR_LOG_ASSIGN_LOGPTR(logger, name) |
#define | GR_CONFIG_LOGGER(config) |
#define | GR_CONFIG_AND_WATCH_LOGGER(config, period) |
#define | GR_LOG_GETLOGGER(logger, name) |
#define | GR_SET_LEVEL(name, level) |
#define | GR_LOG_SET_LEVEL(logger, level) |
#define | GR_GET_LEVEL(name, level) |
#define | GR_LOG_GET_LEVEL(logger, level) |
#define | GR_ADD_APPENDER(name, appender) |
#define | GR_LOG_ADD_APPENDER(logger, appender) |
#define | GR_SET_APPENDER(name, appender) |
#define | GR_LOG_SET_APPENDER(logger, appender) |
#define | GR_ADD_CONSOLE_APPENDER(logger, target, pattern) |
#define | GR_LOG_ADD_CONSOLE_APPENDER(logger, target, pattern) |
#define | GR_SET_CONSOLE_APPENDER(logger, target, pattern) |
#define | GR_LOG_SET_CONSOLE_APPENDER(logger, target, pattern) |
#define | GR_ADD_FILE_APPENDER(name, filename, append, pattern) |
#define | GR_LOG_ADD_FILE_APPENDER(logger, filename, append, pattern) |
#define | GR_SET_FILE_APPENDER(name, filename, append, pattern) |
#define | GR_LOG_SET_FILE_APPENDER(logger, filename, append, pattern) |
#define | GR_ADD_ROLLINGFILE_APPENDER(name, filename, filesize, bkup_index, append, mode, pattern) |
#define | GR_LOG_ADD_ROLLINGFILE_APPENDER(logger, filename, filesize, bkup_index, append, mode, pattern) |
#define | GR_GET_LOGGER_NAMES(names) |
#define | GR_RESET_CONFIGURATION() |
#define | GR_DEBUG(name, msg) |
#define | GR_INFO(name, msg) |
#define | GR_NOTICE(name, msg) |
#define | GR_WARN(name, msg) |
#define | GR_ERROR(name, msg) |
#define | GR_ALERT(name, msg) |
#define | GR_CRIT(name, msg) |
#define | GR_FATAL(name, msg) |
#define | GR_EMERG(name, msg) |
#define | GR_ERRORIF(name, cond, msg) |
#define | GR_ASSERT(name, cond, msg) |
#define | GR_LOG_DEBUG(logger, msg) |
#define | GR_LOG_INFO(logger, msg) |
#define | GR_LOG_NOTICE(logger, msg) |
#define | GR_LOG_WARN(logger, msg) |
#define | GR_LOG_ERROR(logger, msg) |
#define | GR_LOG_ALERT(logger, msg) |
#define | GR_LOG_CRIT(logger, msg) |
#define | GR_LOG_FATAL(logger, msg) |
#define | GR_LOG_EMERG(logger, msg) |
#define | GR_LOG_ERRORIF(logger, cond, msg) |
#define | GR_LOG_ASSERT(logger, cond, msg) |
Typedefs | |
typedef void * | gr::logger_ptr |
Functions | |
GR_RUNTIME_API void | gr_logger_config (const std::string config_filename, unsigned int watch_period=0) |
Function to call configuration macro from python. Note: Configuration is only updated if filename or watch_period has changed. More... | |
GR_RUNTIME_API std::vector< std::string > | gr_logger_get_logger_names (void) |
Function to return logger names to python. More... | |
GR_RUNTIME_API void | gr_logger_reset_config (void) |
Function to reset logger configuration from python. More... | |
GR_RUNTIME_API bool | gr::configure_default_loggers (gr::logger_ptr &l, gr::logger_ptr &d, const std::string name) |
GR_RUNTIME_API bool | gr::update_logger_alias (const std::string &name, const std::string &alias) |
#define ENABLE_GR_LOG |
GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
#define GR_ADD_APPENDER | ( | name, | |
appender | |||
) |
#define GR_ADD_CONSOLE_APPENDER | ( | logger, | |
target, | |||
pattern | |||
) |
#define GR_ADD_FILE_APPENDER | ( | name, | |
filename, | |||
append, | |||
pattern | |||
) |
#define GR_ADD_ROLLINGFILE_APPENDER | ( | name, | |
filename, | |||
filesize, | |||
bkup_index, | |||
append, | |||
mode, | |||
pattern | |||
) |
#define GR_ALERT | ( | name, | |
msg | |||
) |
#define GR_ASSERT | ( | name, | |
cond, | |||
msg | |||
) |
#define GR_CONFIG_AND_WATCH_LOGGER | ( | config, | |
period | |||
) |
#define GR_CONFIG_LOGGER | ( | config | ) |
#define GR_CRIT | ( | name, | |
msg | |||
) |
#define GR_DEBUG | ( | name, | |
msg | |||
) |
#define GR_EMERG | ( | name, | |
msg | |||
) |
#define GR_ERROR | ( | name, | |
msg | |||
) |
#define GR_ERRORIF | ( | name, | |
cond, | |||
msg | |||
) |
#define GR_FATAL | ( | name, | |
msg | |||
) |
#define GR_GET_LEVEL | ( | name, | |
level | |||
) |
#define GR_GET_LOGGER_NAMES | ( | names | ) |
#define GR_INFO | ( | name, | |
msg | |||
) |
#define GR_LOG_ADD_APPENDER | ( | logger, | |
appender | |||
) |
Referenced by gr::logger::add_appender().
#define GR_LOG_ADD_CONSOLE_APPENDER | ( | logger, | |
target, | |||
pattern | |||
) |
Referenced by gr::logger::add_console_appender().
#define GR_LOG_ADD_FILE_APPENDER | ( | logger, | |
filename, | |||
append, | |||
pattern | |||
) |
Referenced by gr::logger::add_file_appender().
#define GR_LOG_ADD_ROLLINGFILE_APPENDER | ( | logger, | |
filename, | |||
filesize, | |||
bkup_index, | |||
append, | |||
mode, | |||
pattern | |||
) |
Referenced by gr::logger::add_rollingfile_appender().
#define GR_LOG_ALERT | ( | logger, | |
msg | |||
) |
Referenced by gr::logger::alert().
#define GR_LOG_ASSERT | ( | logger, | |
cond, | |||
msg | |||
) |
Referenced by gr::logger::log_assert().
#define GR_LOG_ASSIGN_LOGPTR | ( | logger, | |
name | |||
) |
Referenced by gr::logger::logger().
#define GR_LOG_CRIT | ( | logger, | |
msg | |||
) |
Referenced by gr::logger::crit().
#define GR_LOG_DEBUG | ( | logger, | |
msg | |||
) |
Referenced by gr::logger::debug().
#define GR_LOG_DECLARE_LOGPTR | ( | logger | ) |
#define GR_LOG_EMERG | ( | logger, | |
msg | |||
) |
Referenced by gr::logger::emerg().
#define GR_LOG_ERROR | ( | logger, | |
msg | |||
) |
Referenced by gr::logger::error().
#define GR_LOG_ERRORIF | ( | logger, | |
cond, | |||
msg | |||
) |
Referenced by gr::logger::errorIF().
#define GR_LOG_FATAL | ( | logger, | |
msg | |||
) |
Referenced by gr::logger::fatal().
#define GR_LOG_GET_LEVEL | ( | logger, | |
level | |||
) |
Referenced by gr::logger::get_level().
#define GR_LOG_GETLOGGER | ( | logger, | |
name | |||
) |
#define GR_LOG_INFO | ( | logger, | |
msg | |||
) |
Referenced by gr::logger::info().
#define GR_LOG_NOTICE | ( | logger, | |
msg | |||
) |
Referenced by gr::logger::notice().
#define GR_LOG_SET_APPENDER | ( | logger, | |
appender | |||
) |
Referenced by gr::logger::set_appender().
#define GR_LOG_SET_CONSOLE_APPENDER | ( | logger, | |
target, | |||
pattern | |||
) |
Referenced by gr::logger::set_console_appender().
#define GR_LOG_SET_FILE_APPENDER | ( | logger, | |
filename, | |||
append, | |||
pattern | |||
) |
Referenced by gr::logger::set_file_appender().
#define GR_LOG_SET_LEVEL | ( | logger, | |
level | |||
) |
Referenced by gr::logger::set_level().
#define GR_LOG_WARN | ( | logger, | |
msg | |||
) |
Referenced by gr::logger::warn().
#define GR_NOTICE | ( | name, | |
msg | |||
) |
#define GR_RESET_CONFIGURATION | ( | ) |
#define GR_SET_APPENDER | ( | name, | |
appender | |||
) |
#define GR_SET_CONSOLE_APPENDER | ( | logger, | |
target, | |||
pattern | |||
) |
#define GR_SET_FILE_APPENDER | ( | name, | |
filename, | |||
append, | |||
pattern | |||
) |
#define GR_SET_LEVEL | ( | name, | |
level | |||
) |
#define GR_WARN | ( | name, | |
msg | |||
) |
#define HAVE_LOG4CPP |
GR_RUNTIME_API void gr_logger_config | ( | const std::string | config_filename, |
unsigned int | watch_period = 0 |
||
) |
Function to call configuration macro from python. Note: Configuration is only updated if filename or watch_period has changed.
config_filename | Name of configuration file |
watch_period | Seconds to wait between checking for changes in conf file. Watch_period defaults to 0 in which case the file is not watched for changes |
Referenced by gr::logger::add_rollingfile_appender().
GR_RUNTIME_API std::vector<std::string> gr_logger_get_logger_names | ( | void | ) |
Function to return logger names to python.
Referenced by gr::logger::add_rollingfile_appender().
GR_RUNTIME_API void gr_logger_reset_config | ( | void | ) |
Function to reset logger configuration from python.
Referenced by gr::logger::add_rollingfile_appender().