ros2 logging demo C++
I am trying to migrate code to ROS2 and I am stuck on logging.
From https://index.ros.org/doc/ros2/Concep... I got to the code example at https://github.com/ros2/demos/tree/ma...
My problem is that all the log calls use some unscoped get_logger(), or this->get_logger in one file. But I can't find where that is defined or what it is supposed to do. ( e.g. RCLCPP_INFO(get_logger(), "Publishing: '%s'", msg->data.c_str()); )
So 1) I don't get it myself atm 2) this is not a good practice for a demo that should clarify it.
Thanks in advance for help.