In navigation2 repository, ros-topic-logger is implemented. I hope to take in this logger https://github.com/ros-planning/navigation2/blob/master/nav2_bt_navigator/include/nav2_bt_navigator/ros_topic_logger.hpp