29 rcutils_logging_severity_level_from_string(severity_string.c_str(), rcl_get_default_allocator(), &severity);
30 if (RCUTILS_RET_LOGGING_SEVERITY_STRING_INVALID == ret) {
31 throw exceptions::SetLoggingSeverityError(
"Unknown severity string '" + severity_string +
"'");
33 if (ret != RCUTILS_RET_OK) {
34 const std::string msg = rcutils_get_error_string().str;
35 rcutils_reset_error();
36 throw exceptions::SetLoggingSeverityError(msg);
39 ret = rcutils_logging_set_logger_level(logger.get_name(), severity);
40 if (ret != RCUTILS_RET_OK) {
41 const std::string msg = rcutils_get_error_string().str;
42 rcutils_reset_error();
43 throw exceptions::SetLoggingSeverityError(msg);
49 switch (severity_level) {
50 case rclcpp::Logger::Level::Debug:
53 case rclcpp::Logger::Level::Info:
56 case rclcpp::Logger::Level::Warn:
59 case rclcpp::Logger::Level::Error:
62 case rclcpp::Logger::Level::Fatal:
65 case rclcpp::Logger::Level::Unset: