console.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008, Willow Garage, Inc.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  *
8  * * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  * * Redistributions in binary form must reproduce the above copyright
11  * notice, this list of conditions and the following disclaimer in the
12  * documentation and/or other materials provided with the distribution.
13  * * Neither the name of Willow Garage, Inc. nor the names of its
14  * contributors may be used to endorse or promote products derived from
15  * this software without specific prior written permission.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27  * POSSIBILITY OF SUCH DAMAGE.
28  */
29 
30 // Author: Josh Faust
31 
32 #ifndef ROSCONSOLE_ROSCONSOLE_H
33 #define ROSCONSOLE_ROSCONSOLE_H
34 
35 #include "console_backend.h"
36 
37 #include <cstdio>
38 #include <sstream>
39 #include <ros/time.h>
40 #include <cstdarg>
41 #include <ros/macros.h>
42 #include <map>
43 #include <vector>
44 
45 #ifdef ROSCONSOLE_BACKEND_LOG4CXX
46 #include "log4cxx/level.h"
47 #endif
48 
49 // Import/export for windows dll's and visibility for gcc shared libraries.
50 
51 #ifdef ROS_BUILD_SHARED_LIBS // ros is being built around shared libraries
52  #ifdef rosconsole_EXPORTS // we are building a shared lib/dll
53  #define ROSCONSOLE_DECL ROS_HELPER_EXPORT
54  #else // we are using shared lib/dll
55  #define ROSCONSOLE_DECL ROS_HELPER_IMPORT
56  #endif
57 #else // ros is being built around static libraries
58  #define ROSCONSOLE_DECL
59 #endif
60 
61 #ifdef __GNUC__
62 #if __GNUC__ >= 3
63 #define ROSCONSOLE_PRINTF_ATTRIBUTE(a, b) __attribute__ ((__format__ (__printf__, a, b)))
64 #endif
65 #endif
66 
67 #ifndef ROSCONSOLE_PRINTF_ATTRIBUTE
68 #define ROSCONSOLE_PRINTF_ATTRIBUTE(a, b)
69 #endif
70 
71 namespace boost
72 {
73 template<typename T> class shared_array;
74 }
75 
76 namespace ros
77 {
78 namespace console
79 {
80 
82 
83 #ifdef ROSCONSOLE_BACKEND_LOG4CXX
84 extern ROSCONSOLE_DECL log4cxx::LevelPtr g_level_lookup[];
85 #endif
86 
87 extern ROSCONSOLE_DECL bool get_loggers(std::map<std::string, levels::Level>& loggers);
88 extern ROSCONSOLE_DECL bool set_logger_level(const std::string& name, levels::Level level);
89 
93 extern ROSCONSOLE_DECL bool g_initialized;
94 
98 extern ROSCONSOLE_DECL std::string g_last_error_message;
99 
101 {
102 public:
103 
104  virtual ~LogAppender() {}
105 
106  virtual void log(::ros::console::Level level, const char* str, const char* file, const char* function, int line) = 0;
107 
108 };
109 
110 ROSCONSOLE_DECL void register_appender(LogAppender* appender);
111 
112 ROSCONSOLE_DECL void deregister_appender(LogAppender* appender);
113 
114 struct Token
115 {
116  virtual ~Token() {}
117  /*
118  * @param level
119  * @param message
120  * @param file
121  * @param function
122  * @param line
123  */
124  virtual std::string getString(void*, ::ros::console::Level, const char*, const char*, const char*, int) = 0;
125 };
127 typedef std::vector<TokenPtr> V_Token;
128 
129 struct Formatter
130 {
131  void init(const char* fmt);
132  void print(void* logger_handle, ::ros::console::Level level, const char* str, const char* file, const char* function, int line);
133  std::string getTokenStrings(
134  void *logger_handle, ::ros::console::Level level, const char *str,
135  const char *file, const char *function, int line) const;
136  std::string format_;
138 };
139 
144 
152 
153 class FilterBase;
161 ROSCONSOLE_DECL void print(FilterBase* filter, void* logger, Level level,
162  const char* file, int line,
163  const char* function, const char* fmt, ...) ROSCONSOLE_PRINTF_ATTRIBUTE(7, 8);
164 
165 ROSCONSOLE_DECL void print(FilterBase* filter, void* logger, Level level,
166  const std::stringstream& str, const char* file, int line, const char* function);
167 
169 
178 
188 
189 ROSCONSOLE_DECL void setFixedFilterToken(const std::string& key, const std::string& val);
190 
195 {
196  // input parameters
197  const char* file;
198  int line;
199  const char* function;
200  const char* message;
201 
202  // input/output parameters
203  void* logger;
205 
206  // output parameters
207  std::string out_message;
208 };
209 
232 {
233 public:
234  virtual ~FilterBase() {}
239  inline virtual bool isEnabled() { return true; }
244  inline virtual bool isEnabled(FilterParams&) { return true; }
245 };
246 
251 ROSCONSOLE_DECL void initializeLogLocation(LogLocation* loc, const std::string& name, Level level);
260 
265 {
269  void* logger_;
270 };
271 
272 ROSCONSOLE_DECL void vformatToBuffer(boost::shared_array<char>& buffer, size_t& buffer_size, const char* fmt, va_list args);
273 ROSCONSOLE_DECL void formatToBuffer(boost::shared_array<char>& buffer, size_t& buffer_size, const char* fmt, ...);
274 ROSCONSOLE_DECL std::string formatToString(const char* fmt, ...);
275 
276 } // namespace console
277 } // namespace ros
278 
279 #if defined(_MSC_VER)
280 #define ROS_LIKELY(x) (x)
281 #define ROS_UNLIKELY(x) (x)
282 #else
283 #define ROS_LIKELY(x) __builtin_expect((x),1)
284 #define ROS_UNLIKELY(x) __builtin_expect((x),0)
285 #endif
286 
287 #if defined(_MSC_VER)
288  #define __ROSCONSOLE_FUNCTION__ __FUNCSIG__
289 #elif defined(__GNUC__)
290  #define __ROSCONSOLE_FUNCTION__ __PRETTY_FUNCTION__
291 #else
292  #define __ROSCONSOLE_FUNCTION__ ""
293 #endif
294 
295 
296 #ifdef ROS_PACKAGE_NAME
297 #define ROSCONSOLE_PACKAGE_NAME ROS_PACKAGE_NAME
298 #else
299 #define ROSCONSOLE_PACKAGE_NAME "unknown_package"
300 #endif
301 
302 #define ROSCONSOLE_ROOT_LOGGER_NAME "ros"
303 #define ROSCONSOLE_NAME_PREFIX ROSCONSOLE_ROOT_LOGGER_NAME "." ROSCONSOLE_PACKAGE_NAME
304 #define ROSCONSOLE_DEFAULT_NAME ROSCONSOLE_NAME_PREFIX
305 
306 // These allow you to compile-out everything below a certain severity level if necessary
307 #define ROSCONSOLE_SEVERITY_DEBUG 0
308 #define ROSCONSOLE_SEVERITY_INFO 1
309 #define ROSCONSOLE_SEVERITY_WARN 2
310 #define ROSCONSOLE_SEVERITY_ERROR 3
311 #define ROSCONSOLE_SEVERITY_FATAL 4
312 #define ROSCONSOLE_SEVERITY_NONE 5
313 
319 #ifndef ROSCONSOLE_MIN_SEVERITY
320 #define ROSCONSOLE_MIN_SEVERITY ROSCONSOLE_SEVERITY_DEBUG
321 #endif
322 
327 #define ROSCONSOLE_AUTOINIT \
328  do \
329  { \
330  if (ROS_UNLIKELY(!::ros::console::g_initialized)) \
331  { \
332  ::ros::console::initialize(); \
333  } \
334  } while(false)
335 
336 #define ROSCONSOLE_DEFINE_LOCATION(cond, level, name) \
337  ROSCONSOLE_AUTOINIT; \
338  static ::ros::console::LogLocation __rosconsole_define_location__loc = {false, false, ::ros::console::levels::Count, NULL}; /* Initialized at compile-time */ \
339  if (ROS_UNLIKELY(!__rosconsole_define_location__loc.initialized_)) \
340  { \
341  initializeLogLocation(&__rosconsole_define_location__loc, name, level); \
342  } \
343  if (ROS_UNLIKELY(__rosconsole_define_location__loc.level_ != level)) \
344  { \
345  setLogLocationLevel(&__rosconsole_define_location__loc, level); \
346  checkLogLocationEnabled(&__rosconsole_define_location__loc); \
347  } \
348  bool __rosconsole_define_location__enabled = __rosconsole_define_location__loc.logger_enabled_ && (cond);
349 
350 #define ROSCONSOLE_PRINT_AT_LOCATION_WITH_FILTER(filter, ...) \
351  ::ros::console::print(filter, __rosconsole_define_location__loc.logger_, __rosconsole_define_location__loc.level_, __FILE__, __LINE__, __ROSCONSOLE_FUNCTION__, __VA_ARGS__)
352 
353 #define ROSCONSOLE_PRINT_AT_LOCATION(...) \
354  ROSCONSOLE_PRINT_AT_LOCATION_WITH_FILTER(NULL, __VA_ARGS__)
355 
356 // inside a macro which uses args use only well namespaced variable names in order to not overlay variables coming in via args
357 #define ROSCONSOLE_PRINT_STREAM_AT_LOCATION_WITH_FILTER(filter, args) \
358  do \
359  { \
360  std::stringstream __rosconsole_print_stream_at_location_with_filter__ss__; \
361  __rosconsole_print_stream_at_location_with_filter__ss__ << args; \
362  ::ros::console::print(filter, __rosconsole_define_location__loc.logger_, __rosconsole_define_location__loc.level_, __rosconsole_print_stream_at_location_with_filter__ss__, __FILE__, __LINE__, __ROSCONSOLE_FUNCTION__); \
363  } while (0)
364 
365 #define ROSCONSOLE_PRINT_STREAM_AT_LOCATION(args) \
366  ROSCONSOLE_PRINT_STREAM_AT_LOCATION_WITH_FILTER(NULL, args)
367 
372 #define ROSCONSOLE_THROTTLE_CHECK(now, last, period) (ROS_UNLIKELY(last + period <= now) || ROS_UNLIKELY(now < last))
373 
383 #define ROS_LOG_COND(cond, level, name, ...) \
384  do \
385  { \
386  ROSCONSOLE_DEFINE_LOCATION(cond, level, name); \
387  \
388  if (ROS_UNLIKELY(__rosconsole_define_location__enabled)) \
389  { \
390  ROSCONSOLE_PRINT_AT_LOCATION(__VA_ARGS__); \
391  } \
392  } while(false)
393 
403 #define ROS_LOG_STREAM_COND(cond, level, name, args) \
404  do \
405  { \
406  ROSCONSOLE_DEFINE_LOCATION(cond, level, name); \
407  if (ROS_UNLIKELY(__rosconsole_define_location__enabled)) \
408  { \
409  ROSCONSOLE_PRINT_STREAM_AT_LOCATION(args); \
410  } \
411  } while(false)
412 
419 #define ROS_LOG_ONCE(level, name, ...) \
420  do \
421  { \
422  ROSCONSOLE_DEFINE_LOCATION(true, level, name); \
423  static bool hit = false; \
424  if (ROS_UNLIKELY(__rosconsole_define_location__enabled) && ROS_UNLIKELY(!hit)) \
425  { \
426  hit = true; \
427  ROSCONSOLE_PRINT_AT_LOCATION(__VA_ARGS__); \
428  } \
429  } while(false)
430 
431 // inside a macro which uses args use only well namespaced variable names in order to not overlay variables coming in via args
438 #define ROS_LOG_STREAM_ONCE(level, name, args) \
439  do \
440  { \
441  ROSCONSOLE_DEFINE_LOCATION(true, level, name); \
442  static bool __ros_log_stream_once__hit__ = false; \
443  if (ROS_UNLIKELY(__rosconsole_define_location__enabled) && ROS_UNLIKELY(!__ros_log_stream_once__hit__)) \
444  { \
445  __ros_log_stream_once__hit__ = true; \
446  ROSCONSOLE_PRINT_STREAM_AT_LOCATION(args); \
447  } \
448  } while(false)
449 
457 #define ROS_LOG_THROTTLE(period, level, name, ...) \
458  do \
459  { \
460  ROSCONSOLE_DEFINE_LOCATION(true, level, name); \
461  static double __ros_log_throttle_last_hit__ = 0.0; \
462  double __ros_log_throttle_now__ = ::ros::Time::now().toSec(); \
463  if (ROS_UNLIKELY(__rosconsole_define_location__enabled) && ROSCONSOLE_THROTTLE_CHECK(__ros_log_throttle_now__, __ros_log_throttle_last_hit__, period))\
464  { \
465  __ros_log_throttle_last_hit__ = __ros_log_throttle_now__; \
466  ROSCONSOLE_PRINT_AT_LOCATION(__VA_ARGS__); \
467  } \
468  } while(false)
469 
470 // inside a macro which uses args use only well namespaced variable names in order to not overlay variables coming in via args
478 #define ROS_LOG_STREAM_THROTTLE(period, level, name, args) \
479  do \
480  { \
481  ROSCONSOLE_DEFINE_LOCATION(true, level, name); \
482  static double __ros_log_stream_throttle__last_hit__ = 0.0; \
483  double __ros_log_stream_throttle__now__ = ::ros::Time::now().toSec(); \
484  if (ROS_UNLIKELY(__rosconsole_define_location__enabled) && \
485  ROSCONSOLE_THROTTLE_CHECK(__ros_log_stream_throttle__now__, __ros_log_stream_throttle__last_hit__, period))\
486  { \
487  __ros_log_stream_throttle__last_hit__ = __ros_log_stream_throttle__now__; \
488  ROSCONSOLE_PRINT_STREAM_AT_LOCATION(args); \
489  } \
490  } while(false)
491 
499 #define ROS_LOG_DELAYED_THROTTLE(period, level, name, ...) \
500  do \
501  { \
502  ROSCONSOLE_DEFINE_LOCATION(true, level, name); \
503  double __ros_log_delayed_throttle__now__ = ::ros::Time::now().toSec(); \
504  static double __ros_log_delayed_throttle__last_hit__ = __ros_log_delayed_throttle__now__; \
505  if (ROS_UNLIKELY(__rosconsole_define_location__enabled) && \
506  ROSCONSOLE_THROTTLE_CHECK(__ros_log_delayed_throttle__now__, __ros_log_delayed_throttle__last_hit__, period))\
507  { \
508  __ros_log_delayed_throttle__last_hit__ = __ros_log_delayed_throttle__now__; \
509  ROSCONSOLE_PRINT_AT_LOCATION(__VA_ARGS__); \
510  } \
511  } while(false)
512 
513 // inside a macro which uses args use only well namespaced variable names in order to not overlay variables coming in via args
521 #define ROS_LOG_STREAM_DELAYED_THROTTLE(period, level, name, args) \
522  do \
523  { \
524  ROSCONSOLE_DEFINE_LOCATION(true, level, name); \
525  double __ros_log_stream_delayed_throttle__now__ = ::ros::Time::now().toSec(); \
526  static double __ros_log_stream_delayed_throttle__last_hit__ = __ros_log_stream_delayed_throttle__now__; \
527  if (ROS_UNLIKELY(__rosconsole_define_location__enabled) && \
528  ROSCONSOLE_THROTTLE_CHECK(__ros_log_stream_delayed_throttle__now__, __ros_log_stream_delayed_throttle__last_hit__, period)) \
529  { \
530  __ros_log_stream_delayed_throttle__last_hit__ = __ros_log_stream_delayed_throttle__now__; \
531  ROSCONSOLE_PRINT_STREAM_AT_LOCATION(args); \
532  } \
533  } while(false)
534 
542 #define ROS_LOG_FILTER(filter, level, name, ...) \
543  do \
544  { \
545  ROSCONSOLE_DEFINE_LOCATION(true, level, name); \
546  if (ROS_UNLIKELY(__rosconsole_define_location__enabled) && (filter)->isEnabled()) \
547  { \
548  ROSCONSOLE_PRINT_AT_LOCATION_WITH_FILTER(filter, __VA_ARGS__); \
549  } \
550  } while(false)
551 
559 #define ROS_LOG_STREAM_FILTER(filter, level, name, args) \
560  do \
561  { \
562  ROSCONSOLE_DEFINE_LOCATION(true, level, name); \
563  if (ROS_UNLIKELY(__rosconsole_define_location__enabled) && (filter)->isEnabled()) \
564  { \
565  ROSCONSOLE_PRINT_STREAM_AT_LOCATION_WITH_FILTER(filter, args); \
566  } \
567  } while(false)
568 
575 #define ROS_LOG(level, name, ...) ROS_LOG_COND(true, level, name, __VA_ARGS__)
576 
582 #define ROS_LOG_STREAM(level, name, args) ROS_LOG_STREAM_COND(true, level, name, args)
583 
585 
586 #endif // ROSCONSOLE_ROSCONSOLE_H
ros::console::LogLocation::level_
::ros::console::Level level_
Definition: console.h:268
ros::console::FilterParams::file
const char * file
[input] File the message came from
Definition: console.h:197
ros::console::deregister_appender
ROSCONSOLE_DECL void deregister_appender(LogAppender *appender)
Definition: rosconsole.cpp:761
ros::console::vformatToBuffer
ROSCONSOLE_DECL void vformatToBuffer(boost::shared_array< char > &buffer, size_t &buffer_size, const char *fmt, va_list args)
Definition: rosconsole.cpp:517
ros::console::Formatter::format_
std::string format_
Definition: console.h:136
ros::console::Formatter
Definition: console.h:129
ros::console::FilterParams::level
Level level
[input/output] Severity level. If changed, uses the new level
Definition: console.h:204
ros::console::LogAppender::~LogAppender
virtual ~LogAppender()
Definition: console.h:104
ros::console::FilterParams::line
int line
[input] Line the message came from
Definition: console.h:198
ros::console::LogLocation
struct ROSCONSOLE_DECL LogLocation
Definition: console.h:168
boost::shared_ptr
ros::console::V_Token
std::vector< TokenPtr > V_Token
Definition: console.h:127
ros
time.h
ros::console::LogAppender
Definition: console.h:100
ros::console::Formatter::print
void print(void *logger_handle, ::ros::console::Level level, const char *str, const char *file, const char *function, int line)
Definition: rosconsole.cpp:395
boost
ros::console::initializeLogLocation
ROSCONSOLE_DECL void initializeLogLocation(LogLocation *loc, const std::string &name, Level level)
Internal.
Definition: rosconsole.cpp:701
ros::console::set_logger_level
ROSCONSOLE_DECL bool set_logger_level(const std::string &name, levels::Level level)
Definition: rosconsole.cpp:777
ros::console::FilterBase
Base-class for filters. Filters allow full user-defined control over whether or not a message should ...
Definition: console.h:231
ros::console::g_last_error_message
ROSCONSOLE_DECL std::string g_last_error_message
Only exported because the TopicManager need it. Do not use directly.
Definition: rosconsole.cpp:74
macros_generated.h
ros::console::LogLocation::logger_enabled_
bool logger_enabled_
Definition: console.h:267
ros::console::setLogLocationLevel
ROSCONSOLE_DECL void setLogLocationLevel(LogLocation *loc, Level level)
Internal.
Definition: rosconsole.cpp:720
ros::console::register_appender
ROSCONSOLE_DECL void register_appender(LogAppender *appender)
Definition: rosconsole.cpp:756
ros::console::Formatter::init
void init(const char *fmt)
Definition: rosconsole.cpp:356
ROSCONSOLE_DECL
#define ROSCONSOLE_DECL
Definition: console.h:58
ros::console::FilterParams::logger
void * logger
[input/output] Handle identifying logger that this message will be output to. If changed,...
Definition: console.h:203
ros::console::shutdown
ROSCONSOLE_DECL void shutdown()
Definition: rosconsole.cpp:766
ros::console::g_formatter
ROSCONSOLE_DECL Formatter g_formatter
Only exported because the implementation need it. Do not use directly.
Definition: rosconsole.cpp:462
ros::console::formatToBuffer
ROSCONSOLE_DECL void formatToBuffer(boost::shared_array< char > &buffer, size_t &buffer_size, const char *fmt,...)
Definition: rosconsole.cpp:531
ros::console::registerLogLocation
ROSCONSOLE_DECL void registerLogLocation(LogLocation *loc)
Registers a logging location with the system.
Definition: rosconsole.cpp:689
boost::shared_array
Definition: console.h:73
ros::console::Formatter::getTokenStrings
std::string getTokenStrings(void *logger_handle, ::ros::console::Level level, const char *str, const char *file, const char *function, int line) const
Definition: rosconsole.cpp:449
ros::console::setFixedFilterToken
ROSCONSOLE_DECL void setFixedFilterToken(const std::string &key, const std::string &val)
Definition: rosconsole.cpp:96
ros::console::levels::Level
Level
Definition: console_backend.h:53
ROSCONSOLE_PRINTF_ATTRIBUTE
#define ROSCONSOLE_PRINTF_ATTRIBUTE(a, b)
Definition: console.h:68
ros::console::LogLocation::initialized_
bool initialized_
Definition: console.h:266
ros::console::FilterParams::out_message
std::string out_message
[output] If set, writes this message instead of the original
Definition: console.h:207
ros::console::checkLogLocationEnabled
ROSCONSOLE_DECL void checkLogLocationEnabled(LogLocation *loc)
Internal.
Definition: rosconsole.cpp:726
ros::console::Token::getString
virtual std::string getString(void *, ::ros::console::Level, const char *, const char *, const char *, int)=0
ros::console::LogLocation::logger_
void * logger_
Definition: console.h:269
ros::console::notifyLoggerLevelsChanged
ROSCONSOLE_DECL void notifyLoggerLevelsChanged()
Tells the system that a logger's level has changed.
Definition: rosconsole.cpp:732
ros::console::impl::g_level_lookup
log4cxx::LevelPtr g_level_lookup[levels::Count]
Definition: rosconsole_log4cxx.cpp:69
std
ros::console::FilterParams::message
const char * message
[input] The formatted message that will be output
Definition: console.h:200
ros::console::initialize
ROSCONSOLE_DECL void initialize()
Don't call this directly. Performs any required initialization/configuration. Happens automatically w...
Definition: rosconsole.cpp:470
ros::console::FilterBase::~FilterBase
virtual ~FilterBase()
Definition: console.h:234
ros::console::formatToString
ROSCONSOLE_DECL std::string formatToString(const char *fmt,...)
Definition: rosconsole.cpp:541
ros::console::Formatter::tokens_
V_Token tokens_
Definition: console.h:137
ros::console::FilterBase::isEnabled
virtual bool isEnabled(FilterParams &)
Returns whether or not the log statement should be printed. Called once the message has been formatte...
Definition: console.h:244
ros::console::FilterParams
Parameter structure passed to FilterBase::isEnabled(...);. Includes both input and output parameters.
Definition: console.h:194
macros.h
console_backend.h
ros::console::print
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.
Definition: rosconsole.cpp:561
ros::console::Token::~Token
virtual ~Token()
Definition: console.h:116
ros::console::LogAppender::log
virtual void log(::ros::console::Level level, const char *str, const char *file, const char *function, int line)=0
ros::console::get_loggers
ROSCONSOLE_DECL bool get_loggers(std::map< std::string, levels::Level > &loggers)
Definition: rosconsole.cpp:772
ros::console::g_initialized
ROSCONSOLE_DECL bool g_initialized
Only exported because the macros need it. Do not use directly.
Definition: rosconsole.cpp:60
ros::console::Token
Definition: console.h:114
ros::console::Level
levels::Level Level
Definition: console_backend.h:64
ros::console::TokenPtr
boost::shared_ptr< Token > TokenPtr
Definition: console.h:126
ros::console::FilterBase::isEnabled
virtual bool isEnabled()
Returns whether or not the log statement should be printed. Called before the log arguments are evalu...
Definition: console.h:239
ros::console::LogLocation
Internal.
Definition: console.h:264


rosconsole
Author(s): Josh Faust
autogenerated on Wed Mar 2 2022 00:53:52