Namespaces | Classes | Typedefs | Functions | Variables
ros::console Namespace Reference

Namespaces

 backend
 
 impl
 
 levels
 

Classes

struct  FileToken
 
class  FilterBase
 Base-class for filters. Filters allow full user-defined control over whether or not a message should print. The ROS_X_FILTER... macros provide the filtering functionality. More...
 
struct  FilterParams
 Parameter structure passed to FilterBase::isEnabled(...);. Includes both input and output parameters. More...
 
struct  FixedMapToken
 
struct  FixedToken
 
struct  Formatter
 
struct  FunctionToken
 
struct  LineToken
 
class  LogAppender
 
struct  LoggerToken
 
struct  LogLocation
 Internal. More...
 
struct  MessageToken
 
struct  PlaceHolderToken
 
struct  SeverityToken
 
class  StaticInit
 
struct  ThreadToken
 
struct  TimeToken
 
struct  Token
 
struct  WallTimeToken
 

Typedefs

typedef levels::Level Level
 
typedef std::map< std::string, std::string > M_string
 
typedef boost::shared_ptr< TokenTokenPtr
 
typedef std::vector< LogLocation * > V_LogLocation
 
typedef std::vector< TokenPtrV_Token
 

Functions

void _print (void *logger_handle, ::ros::console::Level level, const char *str, const char *file, const char *function, int line)
 
ROSCONSOLE_DECL void checkLogLocationEnabled (LogLocation *loc)
 Internal. More...
 
void checkLogLocationEnabledNoLock (LogLocation *loc)
 
TokenPtr createTokenFromType (const std::string &type)
 
ROSCONSOLE_DECL void deregister_appender (LogAppender *appender)
 
ROSCONSOLE_DECL void formatToBuffer (boost::shared_array< char > &buffer, size_t &buffer_size, const char *fmt,...)
 
ROSCONSOLE_DECL std::string formatToString (const char *fmt,...)
 
static boost::shared_array< char > g_print_buffer (new char[INITIAL_BUFFER_SIZE])
 
ROSCONSOLE_DECL bool get_loggers (std::map< std::string, levels::Level > &loggers)
 
ROSCONSOLE_DECL void initialize ()
 Don't call this directly. Performs any required initialization/configuration. Happens automatically when using the macro API. More...
 
ROSCONSOLE_DECL void initializeLogLocation (LogLocation *loc, const std::string &name, Level level)
 Internal. More...
 
ROSCONSOLE_DECL void notifyLoggerLevelsChanged ()
 Tells the system that a logger's level has changed. More...
 
ROSCONSOLE_DECL void print (FilterBase *filter, void *logger, Level level, const char *file, int line, const char *function, const char *fmt,...) ROSCONSOLE_PRINTF_ATTRIBUTE(7
 Don't call this directly. Use the ROS_LOG() macro instead. More...
 
ROSCONSOLE_DECL void ROSCONSOLE_DECL void print (FilterBase *filter, void *logger, Level level, const std::stringstream &str, const char *file, int line, const char *function)
 
ROSCONSOLE_DECL void register_appender (LogAppender *appender)
 
ROSCONSOLE_DECL void registerLogLocation (LogLocation *loc)
 Registers a logging location with the system. More...
 
ROSCONSOLE_DECL bool set_logger_level (const std::string &name, levels::Level level)
 
ROSCONSOLE_DECL void setFixedFilterToken (const std::string &key, const std::string &val)
 
ROSCONSOLE_DECL void setLogLocationLevel (LogLocation *loc, Level level)
 Internal. More...
 
ROSCONSOLE_DECL void shutdown ()
 
ROSCONSOLE_DECL void vformatToBuffer (boost::shared_array< char > &buffer, size_t &buffer_size, const char *fmt, va_list args)
 

Variables

M_string g_extra_fixed_tokens
 
bool g_force_stdout_line_buffered = false
 
const char * g_format_string = "[${severity}] [${time}]: ${message}"
 
ROSCONSOLE_DECL Formatter g_formatter
 Only exported because the implementation need it. Do not use directly. More...
 
boost::mutex g_init_mutex
 
ROSCONSOLE_DECL bool g_initialized = false
 Only exported because the macros need it. Do not use directly. More...
 
ROSCONSOLE_DECL std::string g_last_error_message = "Unknown Error"
 Only exported because the TopicManager need it. Do not use directly. More...
 
boost::mutex g_locations_mutex
 
V_LogLocation g_log_locations
 
static size_t g_print_buffer_size = INITIAL_BUFFER_SIZE
 
static boost::mutex g_print_mutex
 
static boost::thread::id g_printing_thread_id
 
bool g_shutting_down = false
 
StaticInit g_static_init
 
bool g_stdout_flush_failure_reported = false
 
struct ROSCONSOLE_DECL LogLocation
 

Typedef Documentation

◆ Level

Definition at line 64 of file console_backend.h.

◆ M_string

typedef std::map<std::string, std::string> ros::console::M_string

Definition at line 91 of file rosconsole.cpp.

◆ TokenPtr

Definition at line 126 of file console.h.

◆ V_LogLocation

Definition at line 608 of file rosconsole.cpp.

◆ V_Token

typedef std::vector<TokenPtr> ros::console::V_Token

Definition at line 127 of file console.h.

Function Documentation

◆ _print()

void ros::console::_print ( void *  logger_handle,
::ros::console::Level  level,
const char *  str,
const char *  file,
const char *  function,
int  line 
)

Definition at line 393 of file rosconsole.cpp.

◆ checkLogLocationEnabled()

void ros::console::checkLogLocationEnabled ( LogLocation loc)

Internal.

Definition at line 648 of file rosconsole.cpp.

◆ checkLogLocationEnabledNoLock()

void ros::console::checkLogLocationEnabledNoLock ( LogLocation loc)

Definition at line 618 of file rosconsole.cpp.

◆ createTokenFromType()

TokenPtr ros::console::createTokenFromType ( const std::string &  type)

Definition at line 255 of file rosconsole.cpp.

◆ deregister_appender()

void ros::console::deregister_appender ( LogAppender appender)

Definition at line 683 of file rosconsole.cpp.

◆ formatToBuffer()

void ros::console::formatToBuffer ( boost::shared_array< char > &  buffer,
size_t &  buffer_size,
const char *  fmt,
  ... 
)

Definition at line 453 of file rosconsole.cpp.

◆ formatToString()

std::string ros::console::formatToString ( const char *  fmt,
  ... 
)

Definition at line 463 of file rosconsole.cpp.

◆ g_print_buffer()

static boost::shared_array<char> ros::console::g_print_buffer ( new  char[INITIAL_BUFFER_SIZE])
static

◆ get_loggers()

bool ros::console::get_loggers ( std::map< std::string, levels::Level > &  loggers)

Definition at line 694 of file rosconsole.cpp.

◆ initialize()

void ros::console::initialize ( )

Don't call this directly. Performs any required initialization/configuration. Happens automatically when using the macro API.

If you're going to be using log4cxx or any of the ros::console functions, and need the system to be initialized, use the ROSCONSOLE_AUTOINIT macro.

Definition at line 398 of file rosconsole.cpp.

◆ initializeLogLocation()

void ros::console::initializeLogLocation ( LogLocation loc,
const std::string &  name,
Level  level 
)

Internal.

Definition at line 623 of file rosconsole.cpp.

◆ notifyLoggerLevelsChanged()

void ros::console::notifyLoggerLevelsChanged ( )

Tells the system that a logger's level has changed.

This must be called if a log4cxx::Logger's level has been changed in the middle of an application run. Because of the way the static guard for enablement works, if a logger's level is changed and this function is not called, only logging statements which are first hit after the change will be correct wrt that logger.

Definition at line 654 of file rosconsole.cpp.

◆ print() [1/2]

void ros::console::print ( FilterBase filter,
void *  logger,
Level  level,
const char *  file,
int  line,
const char *  function,
const char *  fmt,
  ... 
)

Don't call this directly. Use the ROS_LOG() macro instead.

Parameters
levelLogging level
fileFile this logging statement is from (usually generated with FILE)
lineLine of code this logging statement is from (usually generated with LINE)
fmtFormat string

Definition at line 483 of file rosconsole.cpp.

◆ print() [2/2]

void ros::console::print ( FilterBase filter,
void *  logger,
Level  level,
const std::stringstream &  str,
const char *  file,
int  line,
const char *  function 
)

Definition at line 552 of file rosconsole.cpp.

◆ register_appender()

void ros::console::register_appender ( LogAppender appender)

Definition at line 678 of file rosconsole.cpp.

◆ registerLogLocation()

void ros::console::registerLogLocation ( LogLocation loc)

Registers a logging location with the system.

This is used for the case where a logger's verbosity level changes, and we need to reset the enabled status of all the logging statements.

Parameters
locThe location to add

Definition at line 611 of file rosconsole.cpp.

◆ set_logger_level()

bool ros::console::set_logger_level ( const std::string &  name,
levels::Level  level 
)

Definition at line 699 of file rosconsole.cpp.

◆ setFixedFilterToken()

void ros::console::setFixedFilterToken ( const std::string &  key,
const std::string &  val 
)

Definition at line 94 of file rosconsole.cpp.

◆ setLogLocationLevel()

void ros::console::setLogLocationLevel ( LogLocation loc,
Level  level 
)

Internal.

Definition at line 642 of file rosconsole.cpp.

◆ shutdown()

void ros::console::shutdown ( )

Definition at line 688 of file rosconsole.cpp.

◆ vformatToBuffer()

void ros::console::vformatToBuffer ( boost::shared_array< char > &  buffer,
size_t &  buffer_size,
const char *  fmt,
va_list  args 
)

Definition at line 439 of file rosconsole.cpp.

Variable Documentation

◆ g_extra_fixed_tokens

M_string ros::console::g_extra_fixed_tokens

Definition at line 92 of file rosconsole.cpp.

◆ g_force_stdout_line_buffered

bool ros::console::g_force_stdout_line_buffered = false

Definition at line 88 of file rosconsole.cpp.

◆ g_format_string

const char* ros::console::g_format_string = "[${severity}] [${time}]: ${message}"

Definition at line 86 of file rosconsole.cpp.

◆ g_formatter

Formatter ros::console::g_formatter

Only exported because the implementation need it. Do not use directly.

Definition at line 390 of file rosconsole.cpp.

◆ g_init_mutex

boost::mutex ros::console::g_init_mutex

Definition at line 61 of file rosconsole.cpp.

◆ g_initialized

bool ros::console::g_initialized = false

Only exported because the macros need it. Do not use directly.

Definition at line 59 of file rosconsole.cpp.

◆ g_last_error_message

std::string ros::console::g_last_error_message = "Unknown Error"

Only exported because the TopicManager need it. Do not use directly.

Definition at line 73 of file rosconsole.cpp.

◆ g_locations_mutex

boost::mutex ros::console::g_locations_mutex

Definition at line 610 of file rosconsole.cpp.

◆ g_log_locations

V_LogLocation ros::console::g_log_locations

Definition at line 609 of file rosconsole.cpp.

◆ g_print_buffer_size

size_t ros::console::g_print_buffer_size = INITIAL_BUFFER_SIZE
static

Definition at line 481 of file rosconsole.cpp.

◆ g_print_mutex

boost::mutex ros::console::g_print_mutex
static

Definition at line 479 of file rosconsole.cpp.

◆ g_printing_thread_id

boost::thread::id ros::console::g_printing_thread_id
static

Definition at line 482 of file rosconsole.cpp.

◆ g_shutting_down

bool ros::console::g_shutting_down = false

Definition at line 60 of file rosconsole.cpp.

◆ g_static_init

StaticInit ros::console::g_static_init

Definition at line 675 of file rosconsole.cpp.

◆ g_stdout_flush_failure_reported

bool ros::console::g_stdout_flush_failure_reported = false

Definition at line 89 of file rosconsole.cpp.

◆ LogLocation

Definition at line 165 of file console.h.



rosconsole
Author(s): Josh Faust
autogenerated on Thu Apr 4 2019 02:50:43