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

Using RCUTILS logging macros

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

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

Comments

1

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 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

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

dhood gravatar image

https://github.com/ros2/ros2/wiki/Log... 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

2 followers

Stats

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

Seen: 516 times

Last updated: May 02 '18