rclcpp  master
C++ ROS Client Library API
Macros
logging.hpp File Reference
#include <type_traits>
#include "rclcpp/logger.hpp"
#include "rcutils/logging_macros.h"
#include "rclcpp/utilities.hpp"
Include dependency graph for logging.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define RCLCPP_LOG_MIN_SEVERITY_DEBUG   0
 
#define RCLCPP_LOG_MIN_SEVERITY_INFO   1
 
#define RCLCPP_LOG_MIN_SEVERITY_WARN   2
 
#define RCLCPP_LOG_MIN_SEVERITY_ERROR   3
 
#define RCLCPP_LOG_MIN_SEVERITY_FATAL   4
 
#define RCLCPP_LOG_MIN_SEVERITY_NONE   5
 
#define RCLCPP_FIRST_ARG(N, ...)   N
 
#define RCLCPP_ALL_BUT_FIRST_ARGS(N, ...)   __VA_ARGS__
 
#define RCLCPP_LOG_MIN_SEVERITY   RCLCPP_LOG_MIN_SEVERITY_DEBUG
 
Logging macros for severity DEBUG.
#define RCLCPP_DEBUG(logger, ...)
 
#define RCLCPP_DEBUG_ONCE(logger, ...)
 
#define RCLCPP_DEBUG_EXPRESSION(logger, expression, ...)
 
#define RCLCPP_DEBUG_FUNCTION(logger, function, ...)
 
#define RCLCPP_DEBUG_SKIPFIRST(logger, ...)
 
Logging macros for severity INFO.
#define RCLCPP_INFO(logger, ...)
 
#define RCLCPP_INFO_ONCE(logger, ...)
 
#define RCLCPP_INFO_EXPRESSION(logger, expression, ...)
 
#define RCLCPP_INFO_FUNCTION(logger, function, ...)
 
#define RCLCPP_INFO_SKIPFIRST(logger, ...)
 
Logging macros for severity WARN.
#define RCLCPP_WARN(logger, ...)
 
#define RCLCPP_WARN_ONCE(logger, ...)
 
#define RCLCPP_WARN_EXPRESSION(logger, expression, ...)
 
#define RCLCPP_WARN_FUNCTION(logger, function, ...)
 
#define RCLCPP_WARN_SKIPFIRST(logger, ...)
 
Logging macros for severity ERROR.
#define RCLCPP_ERROR(logger, ...)
 
#define RCLCPP_ERROR_ONCE(logger, ...)
 
#define RCLCPP_ERROR_EXPRESSION(logger, expression, ...)
 
#define RCLCPP_ERROR_FUNCTION(logger, function, ...)
 
#define RCLCPP_ERROR_SKIPFIRST(logger, ...)
 
Logging macros for severity FATAL.
#define RCLCPP_FATAL(logger, ...)
 
#define RCLCPP_FATAL_ONCE(logger, ...)
 
#define RCLCPP_FATAL_EXPRESSION(logger, expression, ...)
 
#define RCLCPP_FATAL_FUNCTION(logger, function, ...)
 
#define RCLCPP_FATAL_SKIPFIRST(logger, ...)
 

Macro Definition Documentation

◆ RCLCPP_LOG_MIN_SEVERITY_DEBUG

#define RCLCPP_LOG_MIN_SEVERITY_DEBUG   0

◆ RCLCPP_LOG_MIN_SEVERITY_INFO

#define RCLCPP_LOG_MIN_SEVERITY_INFO   1

◆ RCLCPP_LOG_MIN_SEVERITY_WARN

#define RCLCPP_LOG_MIN_SEVERITY_WARN   2

◆ RCLCPP_LOG_MIN_SEVERITY_ERROR

#define RCLCPP_LOG_MIN_SEVERITY_ERROR   3

◆ RCLCPP_LOG_MIN_SEVERITY_FATAL

#define RCLCPP_LOG_MIN_SEVERITY_FATAL   4

◆ RCLCPP_LOG_MIN_SEVERITY_NONE

#define RCLCPP_LOG_MIN_SEVERITY_NONE   5

◆ RCLCPP_FIRST_ARG

#define RCLCPP_FIRST_ARG (   N,
  ... 
)    N

◆ RCLCPP_ALL_BUT_FIRST_ARGS

#define RCLCPP_ALL_BUT_FIRST_ARGS (   N,
  ... 
)    __VA_ARGS__

◆ RCLCPP_LOG_MIN_SEVERITY

#define RCLCPP_LOG_MIN_SEVERITY   RCLCPP_LOG_MIN_SEVERITY_DEBUG

Define RCLCPP_LOG_MIN_SEVERITY=RCLCPP_LOG_MIN_SEVERITY_[DEBUG|INFO|WARN|ERROR|FATAL] in your build options to compile out anything below that severity. Use RCLCPP_LOG_MIN_SEVERITY_NONE to compile out all macros.

◆ RCLCPP_DEBUG

#define RCLCPP_DEBUG (   logger,
  ... 
)
Value:
do { \
static_assert( \
::std::is_same<typename std::remove_reference<typename std::remove_cv<decltype(logger)>::type>::type, \
typename ::rclcpp::Logger>::value, \
"First argument to logging macros must be an rclcpp::Logger"); \
RCUTILS_LOG_DEBUG_NAMED( \
logger.get_name(), \
RCLCPP_ALL_BUT_FIRST_ARGS(__VA_ARGS__,"")); \
} while (0)
const char * get_c_string(const char *string_in)
Return the given string.
#define RCLCPP_FIRST_ARG(N,...)
Definition: logging.hpp:34

Log a message with severity DEBUG.

Parameters
loggerThe rclcpp::Logger to use
...The format string, followed by the variable arguments for the format string. It also accepts a single argument of type std::string.

◆ RCLCPP_DEBUG_ONCE

#define RCLCPP_DEBUG_ONCE (   logger,
  ... 
)
Value:
do { \
static_assert( \
::std::is_same<typename std::remove_reference<typename std::remove_cv<decltype(logger)>::type>::type, \
typename ::rclcpp::Logger>::value, \
"First argument to logging macros must be an rclcpp::Logger"); \
RCUTILS_LOG_DEBUG_ONCE_NAMED( \
logger.get_name(), \
RCLCPP_ALL_BUT_FIRST_ARGS(__VA_ARGS__,"")); \
} while (0)
const char * get_c_string(const char *string_in)
Return the given string.
#define RCLCPP_FIRST_ARG(N,...)
Definition: logging.hpp:34

Log a message with severity DEBUG with the following conditions: All subsequent log calls except the first one are being ignored.

Parameters
loggerThe rclcpp::Logger to use
...The format string, followed by the variable arguments for the format string. It also accepts a single argument of type std::string.

◆ RCLCPP_DEBUG_EXPRESSION

#define RCLCPP_DEBUG_EXPRESSION (   logger,
  expression,
  ... 
)
Value:
do { \
static_assert( \
::std::is_same<typename std::remove_reference<typename std::remove_cv<decltype(logger)>::type>::type, \
typename ::rclcpp::Logger>::value, \
"First argument to logging macros must be an rclcpp::Logger"); \
RCUTILS_LOG_DEBUG_EXPRESSION_NAMED( \
expression, \
logger.get_name(), \
RCLCPP_ALL_BUT_FIRST_ARGS(__VA_ARGS__,"")); \
} while (0)
const char * get_c_string(const char *string_in)
Return the given string.
#define RCLCPP_FIRST_ARG(N,...)
Definition: logging.hpp:34

Log a message with severity DEBUG with the following conditions: Log calls are being ignored when the expression evaluates to false.

Parameters
loggerThe rclcpp::Logger to use
expressionThe expression determining if the message should be logged
...The format string, followed by the variable arguments for the format string. It also accepts a single argument of type std::string.

◆ RCLCPP_DEBUG_FUNCTION

#define RCLCPP_DEBUG_FUNCTION (   logger,
  function,
  ... 
)
Value:
do { \
static_assert( \
::std::is_same<typename std::remove_reference<typename std::remove_cv<decltype(logger)>::type>::type, \
typename ::rclcpp::Logger>::value, \
"First argument to logging macros must be an rclcpp::Logger"); \
RCUTILS_LOG_DEBUG_FUNCTION_NAMED( \
function, \
logger.get_name(), \
RCLCPP_ALL_BUT_FIRST_ARGS(__VA_ARGS__,"")); \
} while (0)
const char * get_c_string(const char *string_in)
Return the given string.
#define RCLCPP_FIRST_ARG(N,...)
Definition: logging.hpp:34

Log a message with severity DEBUG with the following conditions: Log calls are being ignored when the function returns false.

Parameters
loggerThe rclcpp::Logger to use
functionThe functions return value determines if the message should be logged
...The format string, followed by the variable arguments for the format string. It also accepts a single argument of type std::string.

◆ RCLCPP_DEBUG_SKIPFIRST

#define RCLCPP_DEBUG_SKIPFIRST (   logger,
  ... 
)
Value:
do { \
static_assert( \
::std::is_same<typename std::remove_reference<typename std::remove_cv<decltype(logger)>::type>::type, \
typename ::rclcpp::Logger>::value, \
"First argument to logging macros must be an rclcpp::Logger"); \
RCUTILS_LOG_DEBUG_SKIPFIRST_NAMED( \
logger.get_name(), \
RCLCPP_ALL_BUT_FIRST_ARGS(__VA_ARGS__,"")); \
} while (0)
const char * get_c_string(const char *string_in)
Return the given string.
#define RCLCPP_FIRST_ARG(N,...)
Definition: logging.hpp:34

Log a message with severity DEBUG with the following conditions: The first log call is being ignored but all subsequent calls are being processed.

Parameters
loggerThe rclcpp::Logger to use
...The format string, followed by the variable arguments for the format string. It also accepts a single argument of type std::string.

◆ RCLCPP_INFO

#define RCLCPP_INFO (   logger,
  ... 
)
Value:
do { \
static_assert( \
::std::is_same<typename std::remove_reference<typename std::remove_cv<decltype(logger)>::type>::type, \
typename ::rclcpp::Logger>::value, \
"First argument to logging macros must be an rclcpp::Logger"); \
RCUTILS_LOG_INFO_NAMED( \
logger.get_name(), \
RCLCPP_ALL_BUT_FIRST_ARGS(__VA_ARGS__,"")); \
} while (0)
const char * get_c_string(const char *string_in)
Return the given string.
#define RCLCPP_FIRST_ARG(N,...)
Definition: logging.hpp:34

Log a message with severity INFO.

Parameters
loggerThe rclcpp::Logger to use
...The format string, followed by the variable arguments for the format string. It also accepts a single argument of type std::string.

◆ RCLCPP_INFO_ONCE

#define RCLCPP_INFO_ONCE (   logger,
  ... 
)
Value:
do { \
static_assert( \
::std::is_same<typename std::remove_reference<typename std::remove_cv<decltype(logger)>::type>::type, \
typename ::rclcpp::Logger>::value, \
"First argument to logging macros must be an rclcpp::Logger"); \
RCUTILS_LOG_INFO_ONCE_NAMED( \
logger.get_name(), \
RCLCPP_ALL_BUT_FIRST_ARGS(__VA_ARGS__,"")); \
} while (0)
const char * get_c_string(const char *string_in)
Return the given string.
#define RCLCPP_FIRST_ARG(N,...)
Definition: logging.hpp:34

Log a message with severity INFO with the following conditions: All subsequent log calls except the first one are being ignored.

Parameters
loggerThe rclcpp::Logger to use
...The format string, followed by the variable arguments for the format string. It also accepts a single argument of type std::string.

◆ RCLCPP_INFO_EXPRESSION

#define RCLCPP_INFO_EXPRESSION (   logger,
  expression,
  ... 
)
Value:
do { \
static_assert( \
::std::is_same<typename std::remove_reference<typename std::remove_cv<decltype(logger)>::type>::type, \
typename ::rclcpp::Logger>::value, \
"First argument to logging macros must be an rclcpp::Logger"); \
RCUTILS_LOG_INFO_EXPRESSION_NAMED( \
expression, \
logger.get_name(), \
RCLCPP_ALL_BUT_FIRST_ARGS(__VA_ARGS__,"")); \
} while (0)
const char * get_c_string(const char *string_in)
Return the given string.
#define RCLCPP_FIRST_ARG(N,...)
Definition: logging.hpp:34

Log a message with severity INFO with the following conditions: Log calls are being ignored when the expression evaluates to false.

Parameters
loggerThe rclcpp::Logger to use
expressionThe expression determining if the message should be logged
...The format string, followed by the variable arguments for the format string. It also accepts a single argument of type std::string.

◆ RCLCPP_INFO_FUNCTION

#define RCLCPP_INFO_FUNCTION (   logger,
  function,
  ... 
)
Value:
do { \
static_assert( \
::std::is_same<typename std::remove_reference<typename std::remove_cv<decltype(logger)>::type>::type, \
typename ::rclcpp::Logger>::value, \
"First argument to logging macros must be an rclcpp::Logger"); \
RCUTILS_LOG_INFO_FUNCTION_NAMED( \
function, \
logger.get_name(), \
RCLCPP_ALL_BUT_FIRST_ARGS(__VA_ARGS__,"")); \
} while (0)
const char * get_c_string(const char *string_in)
Return the given string.
#define RCLCPP_FIRST_ARG(N,...)
Definition: logging.hpp:34

Log a message with severity INFO with the following conditions: Log calls are being ignored when the function returns false.

Parameters
loggerThe rclcpp::Logger to use
functionThe functions return value determines if the message should be logged
...The format string, followed by the variable arguments for the format string. It also accepts a single argument of type std::string.

◆ RCLCPP_INFO_SKIPFIRST

#define RCLCPP_INFO_SKIPFIRST (   logger,
  ... 
)
Value:
do { \
static_assert( \
::std::is_same<typename std::remove_reference<typename std::remove_cv<decltype(logger)>::type>::type, \
typename ::rclcpp::Logger>::value, \
"First argument to logging macros must be an rclcpp::Logger"); \
RCUTILS_LOG_INFO_SKIPFIRST_NAMED( \
logger.get_name(), \
RCLCPP_ALL_BUT_FIRST_ARGS(__VA_ARGS__,"")); \
} while (0)
const char * get_c_string(const char *string_in)
Return the given string.
#define RCLCPP_FIRST_ARG(N,...)
Definition: logging.hpp:34

Log a message with severity INFO with the following conditions: The first log call is being ignored but all subsequent calls are being processed.

Parameters
loggerThe rclcpp::Logger to use
...The format string, followed by the variable arguments for the format string. It also accepts a single argument of type std::string.

◆ RCLCPP_WARN

#define RCLCPP_WARN (   logger,
  ... 
)
Value:
do { \
static_assert( \
::std::is_same<typename std::remove_reference<typename std::remove_cv<decltype(logger)>::type>::type, \
typename ::rclcpp::Logger>::value, \
"First argument to logging macros must be an rclcpp::Logger"); \
RCUTILS_LOG_WARN_NAMED( \
logger.get_name(), \
RCLCPP_ALL_BUT_FIRST_ARGS(__VA_ARGS__,"")); \
} while (0)
const char * get_c_string(const char *string_in)
Return the given string.
#define RCLCPP_FIRST_ARG(N,...)
Definition: logging.hpp:34

Log a message with severity WARN.

Parameters
loggerThe rclcpp::Logger to use
...The format string, followed by the variable arguments for the format string. It also accepts a single argument of type std::string.

◆ RCLCPP_WARN_ONCE

#define RCLCPP_WARN_ONCE (   logger,
  ... 
)
Value:
do { \
static_assert( \
::std::is_same<typename std::remove_reference<typename std::remove_cv<decltype(logger)>::type>::type, \
typename ::rclcpp::Logger>::value, \
"First argument to logging macros must be an rclcpp::Logger"); \
RCUTILS_LOG_WARN_ONCE_NAMED( \
logger.get_name(), \
RCLCPP_ALL_BUT_FIRST_ARGS(__VA_ARGS__,"")); \
} while (0)
const char * get_c_string(const char *string_in)
Return the given string.
#define RCLCPP_FIRST_ARG(N,...)
Definition: logging.hpp:34

Log a message with severity WARN with the following conditions: All subsequent log calls except the first one are being ignored.

Parameters
loggerThe rclcpp::Logger to use
...The format string, followed by the variable arguments for the format string. It also accepts a single argument of type std::string.

◆ RCLCPP_WARN_EXPRESSION

#define RCLCPP_WARN_EXPRESSION (   logger,
  expression,
  ... 
)
Value:
do { \
static_assert( \
::std::is_same<typename std::remove_reference<typename std::remove_cv<decltype(logger)>::type>::type, \
typename ::rclcpp::Logger>::value, \
"First argument to logging macros must be an rclcpp::Logger"); \
RCUTILS_LOG_WARN_EXPRESSION_NAMED( \
expression, \
logger.get_name(), \
RCLCPP_ALL_BUT_FIRST_ARGS(__VA_ARGS__,"")); \
} while (0)
const char * get_c_string(const char *string_in)
Return the given string.
#define RCLCPP_FIRST_ARG(N,...)
Definition: logging.hpp:34

Log a message with severity WARN with the following conditions: Log calls are being ignored when the expression evaluates to false.

Parameters
loggerThe rclcpp::Logger to use
expressionThe expression determining if the message should be logged
...The format string, followed by the variable arguments for the format string. It also accepts a single argument of type std::string.

◆ RCLCPP_WARN_FUNCTION

#define RCLCPP_WARN_FUNCTION (   logger,
  function,
  ... 
)
Value:
do { \
static_assert( \
::std::is_same<typename std::remove_reference<typename std::remove_cv<decltype(logger)>::type>::type, \
typename ::rclcpp::Logger>::value, \
"First argument to logging macros must be an rclcpp::Logger"); \
RCUTILS_LOG_WARN_FUNCTION_NAMED( \
function, \
logger.get_name(), \
RCLCPP_ALL_BUT_FIRST_ARGS(__VA_ARGS__,"")); \
} while (0)
const char * get_c_string(const char *string_in)
Return the given string.
#define RCLCPP_FIRST_ARG(N,...)
Definition: logging.hpp:34

Log a message with severity WARN with the following conditions: Log calls are being ignored when the function returns false.

Parameters
loggerThe rclcpp::Logger to use
functionThe functions return value determines if the message should be logged
...The format string, followed by the variable arguments for the format string. It also accepts a single argument of type std::string.

◆ RCLCPP_WARN_SKIPFIRST

#define RCLCPP_WARN_SKIPFIRST (   logger,
  ... 
)
Value:
do { \
static_assert( \
::std::is_same<typename std::remove_reference<typename std::remove_cv<decltype(logger)>::type>::type, \
typename ::rclcpp::Logger>::value, \
"First argument to logging macros must be an rclcpp::Logger"); \
RCUTILS_LOG_WARN_SKIPFIRST_NAMED( \
logger.get_name(), \
RCLCPP_ALL_BUT_FIRST_ARGS(__VA_ARGS__,"")); \
} while (0)
const char * get_c_string(const char *string_in)
Return the given string.
#define RCLCPP_FIRST_ARG(N,...)
Definition: logging.hpp:34

Log a message with severity WARN with the following conditions: The first log call is being ignored but all subsequent calls are being processed.

Parameters
loggerThe rclcpp::Logger to use
...The format string, followed by the variable arguments for the format string. It also accepts a single argument of type std::string.

◆ RCLCPP_ERROR

#define RCLCPP_ERROR (   logger,
  ... 
)
Value:
do { \
static_assert( \
::std::is_same<typename std::remove_reference<typename std::remove_cv<decltype(logger)>::type>::type, \
typename ::rclcpp::Logger>::value, \
"First argument to logging macros must be an rclcpp::Logger"); \
RCUTILS_LOG_ERROR_NAMED( \
logger.get_name(), \
RCLCPP_ALL_BUT_FIRST_ARGS(__VA_ARGS__,"")); \
} while (0)
const char * get_c_string(const char *string_in)
Return the given string.
#define RCLCPP_FIRST_ARG(N,...)
Definition: logging.hpp:34

Log a message with severity ERROR.

Parameters
loggerThe rclcpp::Logger to use
...The format string, followed by the variable arguments for the format string. It also accepts a single argument of type std::string.

◆ RCLCPP_ERROR_ONCE

#define RCLCPP_ERROR_ONCE (   logger,
  ... 
)
Value:
do { \
static_assert( \
::std::is_same<typename std::remove_reference<typename std::remove_cv<decltype(logger)>::type>::type, \
typename ::rclcpp::Logger>::value, \
"First argument to logging macros must be an rclcpp::Logger"); \
RCUTILS_LOG_ERROR_ONCE_NAMED( \
logger.get_name(), \
RCLCPP_ALL_BUT_FIRST_ARGS(__VA_ARGS__,"")); \
} while (0)
const char * get_c_string(const char *string_in)
Return the given string.
#define RCLCPP_FIRST_ARG(N,...)
Definition: logging.hpp:34

Log a message with severity ERROR with the following conditions: All subsequent log calls except the first one are being ignored.

Parameters
loggerThe rclcpp::Logger to use
...The format string, followed by the variable arguments for the format string. It also accepts a single argument of type std::string.

◆ RCLCPP_ERROR_EXPRESSION

#define RCLCPP_ERROR_EXPRESSION (   logger,
  expression,
  ... 
)
Value:
do { \
static_assert( \
::std::is_same<typename std::remove_reference<typename std::remove_cv<decltype(logger)>::type>::type, \
typename ::rclcpp::Logger>::value, \
"First argument to logging macros must be an rclcpp::Logger"); \
RCUTILS_LOG_ERROR_EXPRESSION_NAMED( \
expression, \
logger.get_name(), \
RCLCPP_ALL_BUT_FIRST_ARGS(__VA_ARGS__,"")); \
} while (0)
const char * get_c_string(const char *string_in)
Return the given string.
#define RCLCPP_FIRST_ARG(N,...)
Definition: logging.hpp:34

Log a message with severity ERROR with the following conditions: Log calls are being ignored when the expression evaluates to false.

Parameters
loggerThe rclcpp::Logger to use
expressionThe expression determining if the message should be logged
...The format string, followed by the variable arguments for the format string. It also accepts a single argument of type std::string.

◆ RCLCPP_ERROR_FUNCTION

#define RCLCPP_ERROR_FUNCTION (   logger,
  function,
  ... 
)
Value:
do { \
static_assert( \
::std::is_same<typename std::remove_reference<typename std::remove_cv<decltype(logger)>::type>::type, \
typename ::rclcpp::Logger>::value, \
"First argument to logging macros must be an rclcpp::Logger"); \
RCUTILS_LOG_ERROR_FUNCTION_NAMED( \
function, \
logger.get_name(), \
RCLCPP_ALL_BUT_FIRST_ARGS(__VA_ARGS__,"")); \
} while (0)
const char * get_c_string(const char *string_in)
Return the given string.
#define RCLCPP_FIRST_ARG(N,...)
Definition: logging.hpp:34

Log a message with severity ERROR with the following conditions: Log calls are being ignored when the function returns false.

Parameters
loggerThe rclcpp::Logger to use
functionThe functions return value determines if the message should be logged
...The format string, followed by the variable arguments for the format string. It also accepts a single argument of type std::string.

◆ RCLCPP_ERROR_SKIPFIRST

#define RCLCPP_ERROR_SKIPFIRST (   logger,
  ... 
)
Value:
do { \
static_assert( \
::std::is_same<typename std::remove_reference<typename std::remove_cv<decltype(logger)>::type>::type, \
typename ::rclcpp::Logger>::value, \
"First argument to logging macros must be an rclcpp::Logger"); \
RCUTILS_LOG_ERROR_SKIPFIRST_NAMED( \
logger.get_name(), \
RCLCPP_ALL_BUT_FIRST_ARGS(__VA_ARGS__,"")); \
} while (0)
const char * get_c_string(const char *string_in)
Return the given string.
#define RCLCPP_FIRST_ARG(N,...)
Definition: logging.hpp:34

Log a message with severity ERROR with the following conditions: The first log call is being ignored but all subsequent calls are being processed.

Parameters
loggerThe rclcpp::Logger to use
...The format string, followed by the variable arguments for the format string. It also accepts a single argument of type std::string.

◆ RCLCPP_FATAL

#define RCLCPP_FATAL (   logger,
  ... 
)
Value:
do { \
static_assert( \
::std::is_same<typename std::remove_reference<typename std::remove_cv<decltype(logger)>::type>::type, \
typename ::rclcpp::Logger>::value, \
"First argument to logging macros must be an rclcpp::Logger"); \
RCUTILS_LOG_FATAL_NAMED( \
logger.get_name(), \
RCLCPP_ALL_BUT_FIRST_ARGS(__VA_ARGS__,"")); \
} while (0)
const char * get_c_string(const char *string_in)
Return the given string.
#define RCLCPP_FIRST_ARG(N,...)
Definition: logging.hpp:34

Log a message with severity FATAL.

Parameters
loggerThe rclcpp::Logger to use
...The format string, followed by the variable arguments for the format string. It also accepts a single argument of type std::string.

◆ RCLCPP_FATAL_ONCE

#define RCLCPP_FATAL_ONCE (   logger,
  ... 
)
Value:
do { \
static_assert( \
::std::is_same<typename std::remove_reference<typename std::remove_cv<decltype(logger)>::type>::type, \
typename ::rclcpp::Logger>::value, \
"First argument to logging macros must be an rclcpp::Logger"); \
RCUTILS_LOG_FATAL_ONCE_NAMED( \
logger.get_name(), \
RCLCPP_ALL_BUT_FIRST_ARGS(__VA_ARGS__,"")); \
} while (0)
const char * get_c_string(const char *string_in)
Return the given string.
#define RCLCPP_FIRST_ARG(N,...)
Definition: logging.hpp:34

Log a message with severity FATAL with the following conditions: All subsequent log calls except the first one are being ignored.

Parameters
loggerThe rclcpp::Logger to use
...The format string, followed by the variable arguments for the format string. It also accepts a single argument of type std::string.

◆ RCLCPP_FATAL_EXPRESSION

#define RCLCPP_FATAL_EXPRESSION (   logger,
  expression,
  ... 
)
Value:
do { \
static_assert( \
::std::is_same<typename std::remove_reference<typename std::remove_cv<decltype(logger)>::type>::type, \
typename ::rclcpp::Logger>::value, \
"First argument to logging macros must be an rclcpp::Logger"); \
RCUTILS_LOG_FATAL_EXPRESSION_NAMED( \
expression, \
logger.get_name(), \
RCLCPP_ALL_BUT_FIRST_ARGS(__VA_ARGS__,"")); \
} while (0)
const char * get_c_string(const char *string_in)
Return the given string.
#define RCLCPP_FIRST_ARG(N,...)
Definition: logging.hpp:34

Log a message with severity FATAL with the following conditions: Log calls are being ignored when the expression evaluates to false.

Parameters
loggerThe rclcpp::Logger to use
expressionThe expression determining if the message should be logged
...The format string, followed by the variable arguments for the format string. It also accepts a single argument of type std::string.

◆ RCLCPP_FATAL_FUNCTION

#define RCLCPP_FATAL_FUNCTION (   logger,
  function,
  ... 
)
Value:
do { \
static_assert( \
::std::is_same<typename std::remove_reference<typename std::remove_cv<decltype(logger)>::type>::type, \
typename ::rclcpp::Logger>::value, \
"First argument to logging macros must be an rclcpp::Logger"); \
RCUTILS_LOG_FATAL_FUNCTION_NAMED( \
function, \
logger.get_name(), \
RCLCPP_ALL_BUT_FIRST_ARGS(__VA_ARGS__,"")); \
} while (0)
const char * get_c_string(const char *string_in)
Return the given string.
#define RCLCPP_FIRST_ARG(N,...)
Definition: logging.hpp:34

Log a message with severity FATAL with the following conditions: Log calls are being ignored when the function returns false.

Parameters
loggerThe rclcpp::Logger to use
functionThe functions return value determines if the message should be logged
...The format string, followed by the variable arguments for the format string. It also accepts a single argument of type std::string.

◆ RCLCPP_FATAL_SKIPFIRST

#define RCLCPP_FATAL_SKIPFIRST (   logger,
  ... 
)
Value:
do { \
static_assert( \
::std::is_same<typename std::remove_reference<typename std::remove_cv<decltype(logger)>::type>::type, \
typename ::rclcpp::Logger>::value, \
"First argument to logging macros must be an rclcpp::Logger"); \
RCUTILS_LOG_FATAL_SKIPFIRST_NAMED( \
logger.get_name(), \
RCLCPP_ALL_BUT_FIRST_ARGS(__VA_ARGS__,"")); \
} while (0)
const char * get_c_string(const char *string_in)
Return the given string.
#define RCLCPP_FIRST_ARG(N,...)
Definition: logging.hpp:34

Log a message with severity FATAL with the following conditions: The first log call is being ignored but all subsequent calls are being processed.

Parameters
loggerThe rclcpp::Logger to use
...The format string, followed by the variable arguments for the format string. It also accepts a single argument of type std::string.