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

Changing format of debug output

asked 2013-11-17 09:26:35 -0600

vhwanger gravatar image

How do I change the format of ROS_INFO/ROS_DEBUG, etc so that it prints out the filename and line number that it was called from?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-11-17 12:51:03 -0600

jorge gravatar image
export ROSCONSOLE_FORMAT='[${severity}] [${time}] [${file}:${line}]: ${message}'
edit flag offensive delete link more


Thanks! Is there a way to not get the full path to the file?

vhwanger gravatar image vhwanger  ( 2013-11-18 10:43:15 -0600 )edit

mmm... not to my knowledge, sorry; yeah... its too verbose. However, when you write ROS_XXX log macros, you can add a _NAMED suffix specifying who is writing the log messages; not but idea at all in big, complex nodes.

jorge gravatar image jorge  ( 2013-11-18 16:40:25 -0600 )edit

Question Tools

1 follower


Asked: 2013-11-17 09:26:35 -0600

Seen: 199 times

Last updated: Nov 17 '13