ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Using RCUTILS logging macros

asked 2018-04-16 06:48:38 -0600

Skyking gravatar image

Hi, What is the proper way of using the logging macros of rcutils ? I am using RCUTILS_LOG_DEBUG("message") for printing debug statements, but the "message" is not getting printed in the console, even though my node running properly.

Thanks for the help.

edit retag flag offensive close merge delete



Are e.g. INFO messages printed? I guess you have to set the logger level to debug. I'm not sure, but if it is anything like in ROS1, the default is INFO and higher.

mgruhler gravatar image mgruhler  ( 2018-04-16 07:18:55 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-05-02 16:34:29 -0600

dhood gravatar image links to the source code of a logging demo that has different usage examples in C++. The suggestion from @mig to set the logger level to debug is also appropriate (your macro call is using the unnamed logger at the moment). We recommend using named logger objects as in the logging demo, especially for nodes, so that if the node name gets remapped the logger name will get remapped also.

edit flag offensive delete link more

Question Tools



Asked: 2018-04-16 06:48:38 -0600

Seen: 483 times

Last updated: May 02 '18