GNU Radio Manual and C++ API Reference  3.8.1.0
The Free & Open Software Radio Ecosystem
logger.h File Reference
#include <sys/types.h>
#include <gnuradio/api.h>
#include <assert.h>
#include <log4cpp/Category.hh>
#include <log4cpp/FileAppender.hh>
#include <log4cpp/OstreamAppender.hh>
#include <log4cpp/PatternLayout.hh>
#include <log4cpp/PropertyConfigurator.hh>
#include <log4cpp/RollingFileAppender.hh>
#include <pmt/pmt.h>
#include <time.h>
#include <boost/filesystem.hpp>
#include <boost/format.hpp>
#include <boost/thread.hpp>
#include <iostream>

Go to the source code of this file.

Classes

class  gr::logger_config
 Class to control configuration of logger. This is a singleton that can launch a thread to watch a config file for changes. More...
 
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
 GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
 

Macros

#define GR_LOG_DECLARE_LOGPTR(logger)   gr::logger_ptr logger
 
#define GR_LOG_ASSIGN_LOGPTR(logger, name)   logger = gr::logger_get_logger(name)
 
#define GR_CONFIG_LOGGER(config)   gr::logger_config::load_config(config)
 
#define GR_CONFIG_AND_WATCH_LOGGER(config, period)   gr::logger_config::load_config(config, period)
 
#define GR_LOG_GETLOGGER(logger, name)   gr::logger_ptr logger = gr::logger_get_logger(name)
 
#define GR_SET_LEVEL(name, level)
 
#define GR_LOG_SET_LEVEL(logger, level)   gr::logger_set_level(logger, level)
 
#define GR_GET_LEVEL(name, level)
 
#define GR_LOG_GET_LEVEL(logger, level)   gr::logger_get_level(logger, level)
 
#define GR_ADD_CONSOLE_APPENDER(name, target, pattern)
 
#define GR_LOG_ADD_CONSOLE_APPENDER(logger, target, pattern)
 
#define GR_SET_CONSOLE_APPENDER(name, 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()   gr::logger_config::reset_config();
 
#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_CRIT(name, msg)
 
#define GR_ALERT(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_CRIT(logger, msg)
 
#define GR_LOG_ALERT(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 log4cpp::Category * gr::logger_ptr
 GR_LOG macrosThese macros wrap the standard LOG4CPP_LEVEL macros. The availablie macros are: LOG_DEBUG LOG_INFO LOG_WARN LOG_TRACE LOG_ERROR LOG_ALERT LOG_CRIT LOG_FATAL LOG_EMERG. More...
 

Functions

GR_RUNTIME_API logger_ptr gr::logger_get_logger (std::string name)
 Retrieve a pointer to a logger by name. More...
 
GR_RUNTIME_API bool gr::logger_load_config (const std::string &config_filename="")
 Load logger's configuration file. More...
 
GR_RUNTIME_API void gr::logger_reset_config (void)
 Reset logger's configuration file. More...
 
GR_RUNTIME_API void gr::logger_set_level (logger_ptr logger, const std::string &level)
 Set the logger's output level. More...
 
GR_RUNTIME_API void gr::logger_set_level (logger_ptr logger, log4cpp::Priority::Value level)
 Set the logger's output level. More...
 
GR_RUNTIME_API void gr::logger_get_level (logger_ptr logger, std::string &level)
 Get the logger's output level. More...
 
GR_RUNTIME_API void gr::logger_get_level (logger_ptr logger, log4cpp::Priority::Value &level)
 Get the logger's output level. More...
 
GR_RUNTIME_API void gr::logger_add_appender (logger_ptr logger, std::string appender)
 Add console appender to a given logger. More...
 
GR_RUNTIME_API void gr::logger_set_appender (logger_ptr logger, std::string appender)
 Sets a console appender to a given logger. Deletes any existing appenders and adds a new one. To add an additional appender, use logger_add_appender. More...
 
GR_RUNTIME_API void gr::logger_add_console_appender (logger_ptr logger, std::string target, std::string pattern)
 Add console appender to a given logger. More...
 
GR_RUNTIME_API void gr::logger_set_console_appender (logger_ptr logger, std::string target, std::string pattern)
 Sets a new console appender to a given logger after removing all others. Use logger_add_console_appender to add another. More...
 
GR_RUNTIME_API void gr::logger_add_file_appender (logger_ptr logger, std::string filename, bool append, std::string pattern)
 Add file appender to a given logger. More...
 
GR_RUNTIME_API void gr::logger_set_file_appender (logger_ptr logger, std::string filename, bool append, std::string pattern)
 Set a file appender to a given logger. To add another file appender, use logger_add_file_appender. More...
 
GR_RUNTIME_API void gr::logger_add_rollingfile_appender (logger_ptr logger, std::string filename, size_t filesize, int bkup_index, bool append, mode_t mode, std::string pattern)
 Add rolling file appender to a given logger. More...
 
GR_RUNTIME_API std::vector< std::string > gr::logger_get_logger_names (void)
 Add rolling file appender to a given logger. More...
 
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)
 

Macro Definition Documentation

◆ GR_ADD_CONSOLE_APPENDER

#define GR_ADD_CONSOLE_APPENDER (   name,
  target,
  pattern 
)
Value:
{ \
gr::logger_add_console_appender(logger, target, pattern); \
}
GR_RUNTIME_API void logger_add_console_appender(logger_ptr logger, std::string target, std::string pattern)
Add console appender to a given logger.
log4cpp::Category * logger_ptr
GR_LOG macrosThese macros wrap the standard LOG4CPP_LEVEL macros. The availablie macros are: LOG_DEBU...
Definition: logger.h:71
GR_RUNTIME_API logger_ptr logger_get_logger(std::string name)
Retrieve a pointer to a logger by name.

◆ GR_ADD_FILE_APPENDER

#define GR_ADD_FILE_APPENDER (   name,
  filename,
  append,
  pattern 
)
Value:
{ \
gr::logger_add_file_appender(logger, filename, append, pattern); \
}
log4cpp::Category * logger_ptr
GR_LOG macrosThese macros wrap the standard LOG4CPP_LEVEL macros. The availablie macros are: LOG_DEBU...
Definition: logger.h:71
GR_RUNTIME_API void logger_add_file_appender(logger_ptr logger, std::string filename, bool append, std::string pattern)
Add file appender to a given logger.
GR_RUNTIME_API logger_ptr logger_get_logger(std::string name)
Retrieve a pointer to a logger by name.

◆ GR_ADD_ROLLINGFILE_APPENDER

#define GR_ADD_ROLLINGFILE_APPENDER (   name,
  filename,
  filesize,
  bkup_index,
  append,
  mode,
  pattern 
)
Value:
{ \
logger, filename, filesize, bkup_index, append, mode, pattern); \
}
GR_RUNTIME_API void logger_add_rollingfile_appender(logger_ptr logger, std::string filename, size_t filesize, int bkup_index, bool append, mode_t mode, std::string pattern)
Add rolling file appender to a given logger.
log4cpp::Category * logger_ptr
GR_LOG macrosThese macros wrap the standard LOG4CPP_LEVEL macros. The availablie macros are: LOG_DEBU...
Definition: logger.h:71
GR_RUNTIME_API logger_ptr logger_get_logger(std::string name)
Retrieve a pointer to a logger by name.

◆ GR_ALERT

#define GR_ALERT (   name,
  msg 
)
Value:
{ \
*logger << log4cpp::Priority::ALERT << (msg) << log4cpp::eol; \
}
log4cpp::Category * logger_ptr
GR_LOG macrosThese macros wrap the standard LOG4CPP_LEVEL macros. The availablie macros are: LOG_DEBU...
Definition: logger.h:71
GR_RUNTIME_API logger_ptr logger_get_logger(std::string name)
Retrieve a pointer to a logger by name.

◆ GR_ASSERT

#define GR_ASSERT (   name,
  cond,
  msg 
)
Value:
{ \
if (!(cond)) { \
*logger << log4cpp::Priority::EMERG << (msg) << log4cpp::eol; \
} \
assert(0); \
}
log4cpp::Category * logger_ptr
GR_LOG macrosThese macros wrap the standard LOG4CPP_LEVEL macros. The availablie macros are: LOG_DEBU...
Definition: logger.h:71
GR_RUNTIME_API logger_ptr logger_get_logger(std::string name)
Retrieve a pointer to a logger by name.

◆ GR_CONFIG_AND_WATCH_LOGGER

#define GR_CONFIG_AND_WATCH_LOGGER (   config,
  period 
)    gr::logger_config::load_config(config, period)

◆ GR_CONFIG_LOGGER

#define GR_CONFIG_LOGGER (   config)    gr::logger_config::load_config(config)

◆ GR_CRIT

#define GR_CRIT (   name,
  msg 
)
Value:
{ \
*logger << log4cpp::Priority::CRIT << (msg) << log4cpp::eol; \
}
log4cpp::Category * logger_ptr
GR_LOG macrosThese macros wrap the standard LOG4CPP_LEVEL macros. The availablie macros are: LOG_DEBU...
Definition: logger.h:71
GR_RUNTIME_API logger_ptr logger_get_logger(std::string name)
Retrieve a pointer to a logger by name.

◆ GR_DEBUG

#define GR_DEBUG (   name,
  msg 
)
Value:
{ \
*logger << log4cpp::Priority::DEBUG << (msg) << log4cpp::eol; \
}
log4cpp::Category * logger_ptr
GR_LOG macrosThese macros wrap the standard LOG4CPP_LEVEL macros. The availablie macros are: LOG_DEBU...
Definition: logger.h:71
GR_RUNTIME_API logger_ptr logger_get_logger(std::string name)
Retrieve a pointer to a logger by name.

◆ GR_EMERG

#define GR_EMERG (   name,
  msg 
)
Value:
{ \
*logger << log4cpp::Priority::EMERG << (msg) << log4cpp::eol; \
}
log4cpp::Category * logger_ptr
GR_LOG macrosThese macros wrap the standard LOG4CPP_LEVEL macros. The availablie macros are: LOG_DEBU...
Definition: logger.h:71
GR_RUNTIME_API logger_ptr logger_get_logger(std::string name)
Retrieve a pointer to a logger by name.

◆ GR_ERROR

#define GR_ERROR (   name,
  msg 
)
Value:
{ \
*logger << log4cpp::Priority::ERROR << (msg) << log4cpp::eol; \
}
log4cpp::Category * logger_ptr
GR_LOG macrosThese macros wrap the standard LOG4CPP_LEVEL macros. The availablie macros are: LOG_DEBU...
Definition: logger.h:71
GR_RUNTIME_API logger_ptr logger_get_logger(std::string name)
Retrieve a pointer to a logger by name.

◆ GR_ERRORIF

#define GR_ERRORIF (   name,
  cond,
  msg 
)
Value:
{ \
if ((cond)) { \
*logger << log4cpp::Priority::ERROR << (msg) << log4cpp::eol; \
} \
}
log4cpp::Category * logger_ptr
GR_LOG macrosThese macros wrap the standard LOG4CPP_LEVEL macros. The availablie macros are: LOG_DEBU...
Definition: logger.h:71
GR_RUNTIME_API logger_ptr logger_get_logger(std::string name)
Retrieve a pointer to a logger by name.

◆ GR_FATAL

#define GR_FATAL (   name,
  msg 
)
Value:
{ \
*logger << log4cpp::Priority::FATAL << (msg) << log4cpp::eol; \
}
log4cpp::Category * logger_ptr
GR_LOG macrosThese macros wrap the standard LOG4CPP_LEVEL macros. The availablie macros are: LOG_DEBU...
Definition: logger.h:71
GR_RUNTIME_API logger_ptr logger_get_logger(std::string name)
Retrieve a pointer to a logger by name.

◆ GR_GET_LEVEL

#define GR_GET_LEVEL (   name,
  level 
)
Value:
{ \
gr::logger_get_level(logger, level); \
}
GR_RUNTIME_API void logger_get_level(logger_ptr logger, log4cpp::Priority::Value &level)
Get the logger&#39;s output level.
log4cpp::Category * logger_ptr
GR_LOG macrosThese macros wrap the standard LOG4CPP_LEVEL macros. The availablie macros are: LOG_DEBU...
Definition: logger.h:71
GR_RUNTIME_API logger_ptr logger_get_logger(std::string name)
Retrieve a pointer to a logger by name.

◆ GR_GET_LOGGER_NAMES

#define GR_GET_LOGGER_NAMES (   names)
Value:
{ \
}
GR_RUNTIME_API std::vector< std::string > logger_get_logger_names(void)
Add rolling file appender to a given logger.

◆ GR_INFO

#define GR_INFO (   name,
  msg 
)
Value:
{ \
*logger << log4cpp::Priority::INFO << (msg) << log4cpp::eol; \
}
log4cpp::Category * logger_ptr
GR_LOG macrosThese macros wrap the standard LOG4CPP_LEVEL macros. The availablie macros are: LOG_DEBU...
Definition: logger.h:71
GR_RUNTIME_API logger_ptr logger_get_logger(std::string name)
Retrieve a pointer to a logger by name.

◆ GR_LOG_ADD_CONSOLE_APPENDER

#define GR_LOG_ADD_CONSOLE_APPENDER (   logger,
  target,
  pattern 
)
Value:
{ \
gr::logger_add_console_appender(logger, target, pattern); \
}
GR_RUNTIME_API void logger_add_console_appender(logger_ptr logger, std::string target, std::string pattern)
Add console appender to a given logger.

Referenced by gr::logger::add_console_appender().

◆ GR_LOG_ADD_FILE_APPENDER

#define GR_LOG_ADD_FILE_APPENDER (   logger,
  filename,
  append,
  pattern 
)
Value:
{ \
gr::logger_add_file_appender(logger, filename, append, pattern); \
}
GR_RUNTIME_API void logger_add_file_appender(logger_ptr logger, std::string filename, bool append, std::string pattern)
Add file appender to a given logger.

Referenced by gr::logger::add_file_appender().

◆ GR_LOG_ADD_ROLLINGFILE_APPENDER

#define GR_LOG_ADD_ROLLINGFILE_APPENDER (   logger,
  filename,
  filesize,
  bkup_index,
  append,
  mode,
  pattern 
)
Value:
{ \
logger, filename, filesize, bkup_index, append, mode, pattern); \
}
GR_RUNTIME_API void logger_add_rollingfile_appender(logger_ptr logger, std::string filename, size_t filesize, int bkup_index, bool append, mode_t mode, std::string pattern)
Add rolling file appender to a given logger.

Referenced by gr::logger::add_rollingfile_appender().

◆ GR_LOG_ALERT

#define GR_LOG_ALERT (   logger,
  msg 
)
Value:
{ \
*logger << log4cpp::Priority::ALERT << (msg) << log4cpp::eol; \
}

Referenced by gr::logger::alert().

◆ GR_LOG_ASSERT

#define GR_LOG_ASSERT (   logger,
  cond,
  msg 
)
Value:
{ \
if (!(cond)) { \
*logger << log4cpp::Priority::EMERG << (msg) << log4cpp::eol; \
assert(0); \
} \
}

Referenced by gr::logger::log_assert().

◆ GR_LOG_ASSIGN_LOGPTR

#define GR_LOG_ASSIGN_LOGPTR (   logger,
  name 
)    logger = gr::logger_get_logger(name)

Referenced by gr::logger::logger().

◆ GR_LOG_CRIT

#define GR_LOG_CRIT (   logger,
  msg 
)
Value:
{ \
*logger << log4cpp::Priority::CRIT << (msg) << log4cpp::eol; \
}

Referenced by gr::logger::crit().

◆ GR_LOG_DEBUG

#define GR_LOG_DEBUG (   logger,
  msg 
)
Value:
{ \
*logger << log4cpp::Priority::DEBUG << (msg) << log4cpp::eol; \
}

Referenced by gr::logger::debug().

◆ GR_LOG_DECLARE_LOGPTR

#define GR_LOG_DECLARE_LOGPTR (   logger)    gr::logger_ptr logger

◆ GR_LOG_EMERG

#define GR_LOG_EMERG (   logger,
  msg 
)
Value:
{ \
*logger << log4cpp::Priority::EMERG << (msg) << log4cpp::eol; \
}

Referenced by gr::logger::emerg().

◆ GR_LOG_ERROR

#define GR_LOG_ERROR (   logger,
  msg 
)
Value:
{ \
*logger << log4cpp::Priority::ERROR << (msg) << log4cpp::eol; \
}

Referenced by gr::logger::error().

◆ GR_LOG_ERRORIF

#define GR_LOG_ERRORIF (   logger,
  cond,
  msg 
)
Value:
{ \
if ((cond)) { \
*logger << log4cpp::Priority::ERROR << (msg) << log4cpp::eol; \
} \
}

Referenced by gr::logger::errorIF().

◆ GR_LOG_FATAL

#define GR_LOG_FATAL (   logger,
  msg 
)
Value:
{ \
*logger << log4cpp::Priority::FATAL << (msg) << log4cpp::eol; \
}

Referenced by gr::logger::fatal().

◆ GR_LOG_GET_LEVEL

#define GR_LOG_GET_LEVEL (   logger,
  level 
)    gr::logger_get_level(logger, level)

Referenced by gr::logger::get_level().

◆ GR_LOG_GETLOGGER

#define GR_LOG_GETLOGGER (   logger,
  name 
)    gr::logger_ptr logger = gr::logger_get_logger(name)

◆ GR_LOG_INFO

#define GR_LOG_INFO (   logger,
  msg 
)
Value:
{ \
*logger << log4cpp::Priority::INFO << (msg) << log4cpp::eol; \
}

Referenced by gr::logger::info().

◆ GR_LOG_NOTICE

#define GR_LOG_NOTICE (   logger,
  msg 
)
Value:
{ \
*logger << log4cpp::Priority::NOTICE << (msg) << log4cpp::eol; \
}

Referenced by gr::logger::notice().

◆ GR_LOG_SET_CONSOLE_APPENDER

#define GR_LOG_SET_CONSOLE_APPENDER (   logger,
  target,
  pattern 
)
Value:
{ \
gr::logger_set_console_appender(logger, target, pattern); \
}
GR_RUNTIME_API void logger_set_console_appender(logger_ptr logger, std::string target, std::string pattern)
Sets a new console appender to a given logger after removing all others. Use logger_add_console_appen...

Referenced by gr::logger::set_console_appender().

◆ GR_LOG_SET_FILE_APPENDER

#define GR_LOG_SET_FILE_APPENDER (   logger,
  filename,
  append,
  pattern 
)
Value:
{ \
gr::logger_set_file_appender(logger, filename, append, pattern); \
}
GR_RUNTIME_API void logger_set_file_appender(logger_ptr logger, std::string filename, bool append, std::string pattern)
Set a file appender to a given logger. To add another file appender, use logger_add_file_appender.

Referenced by gr::logger::set_file_appender().

◆ GR_LOG_SET_LEVEL

#define GR_LOG_SET_LEVEL (   logger,
  level 
)    gr::logger_set_level(logger, level)

Referenced by gr::logger::set_level().

◆ GR_LOG_WARN

#define GR_LOG_WARN (   logger,
  msg 
)
Value:
{ \
*logger << log4cpp::Priority::WARN << (msg) << log4cpp::eol; \
}

Referenced by gr::logger::warn().

◆ GR_NOTICE

#define GR_NOTICE (   name,
  msg 
)
Value:
{ \
*logger << log4cpp::Priority::NOTICE << (msg); \
}
log4cpp::Category * logger_ptr
GR_LOG macrosThese macros wrap the standard LOG4CPP_LEVEL macros. The availablie macros are: LOG_DEBU...
Definition: logger.h:71
GR_RUNTIME_API logger_ptr logger_get_logger(std::string name)
Retrieve a pointer to a logger by name.

◆ GR_RESET_CONFIGURATION

#define GR_RESET_CONFIGURATION ( )    gr::logger_config::reset_config();

◆ GR_SET_CONSOLE_APPENDER

#define GR_SET_CONSOLE_APPENDER (   name,
  target,
  pattern 
)
Value:
{ \
gr::logger_set_console_appender(logger, target, pattern); \
}
log4cpp::Category * logger_ptr
GR_LOG macrosThese macros wrap the standard LOG4CPP_LEVEL macros. The availablie macros are: LOG_DEBU...
Definition: logger.h:71
GR_RUNTIME_API logger_ptr logger_get_logger(std::string name)
Retrieve a pointer to a logger by name.
GR_RUNTIME_API void logger_set_console_appender(logger_ptr logger, std::string target, std::string pattern)
Sets a new console appender to a given logger after removing all others. Use logger_add_console_appen...

◆ GR_SET_FILE_APPENDER

#define GR_SET_FILE_APPENDER (   name,
  filename,
  append,
  pattern 
)
Value:
{ \
gr::logger_set_file_appender(logger, filename, append, pattern); \
}
GR_RUNTIME_API void logger_set_file_appender(logger_ptr logger, std::string filename, bool append, std::string pattern)
Set a file appender to a given logger. To add another file appender, use logger_add_file_appender.
log4cpp::Category * logger_ptr
GR_LOG macrosThese macros wrap the standard LOG4CPP_LEVEL macros. The availablie macros are: LOG_DEBU...
Definition: logger.h:71
GR_RUNTIME_API logger_ptr logger_get_logger(std::string name)
Retrieve a pointer to a logger by name.

◆ GR_SET_LEVEL

#define GR_SET_LEVEL (   name,
  level 
)
Value:
{ \
gr::logger_set_level(logger, level); \
}
log4cpp::Category * logger_ptr
GR_LOG macrosThese macros wrap the standard LOG4CPP_LEVEL macros. The availablie macros are: LOG_DEBU...
Definition: logger.h:71
GR_RUNTIME_API logger_ptr logger_get_logger(std::string name)
Retrieve a pointer to a logger by name.
GR_RUNTIME_API void logger_set_level(logger_ptr logger, log4cpp::Priority::Value level)
Set the logger&#39;s output level.

◆ GR_WARN

#define GR_WARN (   name,
  msg 
)
Value:
{ \
*logger << log4cpp::Priority::WARN << (msg) << log4cpp::eol; \
}
log4cpp::Category * logger_ptr
GR_LOG macrosThese macros wrap the standard LOG4CPP_LEVEL macros. The availablie macros are: LOG_DEBU...
Definition: logger.h:71
GR_RUNTIME_API logger_ptr logger_get_logger(std::string name)
Retrieve a pointer to a logger by name.

Referenced by thrift_application_base< TserverBase, TImplClass >::thrift_application_base().

Function Documentation

◆ gr_logger_config()

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.

Parameters
config_filenameName of configuration file
watch_periodSeconds 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_logger_get_logger_names()

GR_RUNTIME_API std::vector<std::string> gr_logger_get_logger_names ( void  )

Function to return logger names to python.

Returns
Vector of name strings

Referenced by gr::logger::add_rollingfile_appender().

◆ gr_logger_reset_config()

GR_RUNTIME_API void gr_logger_reset_config ( void  )

Function to reset logger configuration from python.

Referenced by gr::logger::add_rollingfile_appender().