Open bit-pirate opened 10 years ago
I would not add the node name to the log message directly, ros logging handles that for you, I would instead change the output format:
http://wiki.ros.org/rosconsole#Console_Output_Formatting
To something like this:
export ROSCONSOLE_FORMAT='[${severity}] [${time}]: ${node}: ${message}'
What do you think?
Hm, I must have close a tab before sending my reply...
Your suggestion sound great! Didn't know about this rosconsole feature.
However, I tried it and somehow it doesn't seem to work with rospy nodes. E.g. I'm launching turtlebot's minimal with app manager launcher plus capability server. The only thing adhering to my rosconsole format is the C++ node zeroconf. Maybe there is a related bug in rospy?
Looks like rospy does not respect this >.<
Maybe we should just fix it in rospy... Let me look into to how bad that would be.
@wjwwood , any insights into this issue?
The fix in rospy
hasn't been made yet, and I'm not sure if we can do it in hydro and groovy, so I plan to fix this problem in capabilities for now, probably once we get the Indigo farm up and running I will spend some time on this.
Then one can easily identify where a log message is coming from (without the need of rqt_console).
Here for example the app manager:
Second message is from the capability server.
Instead of prepending a (fixed) name, we could also append the real node name, e.g. capability_server.