diff --git a/moveit_core/exceptions/src/exceptions.cpp b/moveit_core/exceptions/src/exceptions.cpp index 32d3c057d0..c275edfafd 100644 --- a/moveit_core/exceptions/src/exceptions.cpp +++ b/moveit_core/exceptions/src/exceptions.cpp @@ -38,14 +38,15 @@ #include #include "rclcpp/rclcpp.hpp" -#define ROS_ERROR RCUTILS_LOG_ERROR +// Logger +rclcpp::Logger logger_exceptions = rclcpp::get_logger("exceptions"); moveit::ConstructException::ConstructException(const std::string& what_arg) : std::runtime_error(what_arg) { - ROS_ERROR("Error during construction of object: %s\nException thrown.", what_arg.c_str()); + RCLCPP_ERROR(logger_exceptions, "Error during construction of object: %s\nException thrown.", what_arg.c_str()); } moveit::Exception::Exception(const std::string& what_arg) : std::runtime_error(what_arg) { - ROS_ERROR("Exception thrown.", what_arg.c_str()); + RCLCPP_ERROR(logger_exceptions, "Exception thrown.", what_arg.c_str()); }