18 #include "rcl_logging_interface/rcl_logging_interface.h"
20 #include "rclcpp/exceptions.hpp"
21 #include "rclcpp/log_directory.hpp"
29 char * log_dir = NULL;
30 auto allocator = rcutils_get_default_allocator();
31 rcl_logging_ret_t ret = rcl_logging_get_logging_directory(allocator, &log_dir);
32 if (RCL_LOGGING_RET_OK != ret) {
33 rclcpp::exceptions::throw_from_rcl_error(ret);
35 std::string path{log_dir};
36 allocator.deallocate(log_dir, allocator.state);
Versions of rosidl_typesupport_cpp::get_message_type_support_handle that handle adapted types.
RCLCPP_PUBLIC std::filesystem::path get_log_directory()
Get the current logging directory.