Ask Your Question
0

Changing format of debug output

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

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
1

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

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

Comments

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

vhwanger gravatar image vhwanger  ( 2013-11-18 10:43:15 -0500 )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 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

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

Seen: 112 times

Last updated: Nov 17 '13