ros / ros_comm

ROS communications-related packages, including core client libraries (roscpp, rospy, roslisp) and graph introspection tools (rostopic, rosnode, rosservice, rosparam).
http://wiki.ros.org/ros_comm
753 stars 911 forks source link

Add bool return to _base_logger, log* functions #2335

Open owenclaxton-QUT opened 1 year ago

owenclaxton-QUT commented 1 year ago

Add a bool return to expose whether log succeeded for:

Explanation Provides the user a trigger for actions which may be sensitive to logging (i.e. creating a 'static' diagnostic display). The return will be true, if:

Specific example use case: When working with the log*_throttle functions, I needed a way to detect whether a loginfo_throttle was actually printing, as I needed to know how many lines to escape and clear before writing new content on-top for a 'static' diagnostic display. The bool already existed, but just needed to be exposed to the user.