-
Notifications
You must be signed in to change notification settings - Fork 914
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add node name to the output in rosout.log #918
Conversation
@ros-pull-request-builder retest this please |
@commaster90 can you give us a sample of what the text output was before, and a sample of what your change will produce? |
@@ -141,7 +141,8 @@ class Rosout | |||
ss << msg->level << " "; | |||
} | |||
|
|||
ss << "[" << msg->file << ":" << msg->line << "(" << msg->function << ") "; | |||
ss << msg->name << " "; | |||
ss << "[" << msg->file << ":" << msg->line << "(" << msg->function << ")] "; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to make this change more visible. In this line the missing ]
has been added. Without the change the brackets are unbalanced.
This is an example output in ~/.ros/latest/rosout.log before the change.
And this will be the output in ~/.ros/latest/rosout.log after the change.
|
That makes sense, but I think I'm a bit confused. I thought the output format was dictated by the |
@IanTheEngineer It is my concern too that this might break other code that parse rosout.log. Therefore, I would like to seek opinion here. I notice that the rosconsole config file you mentioned affects only the output shown on the console, and the config can be different for every node. It however does not log any output to file. It is also a bit confusing because for Python nodes, individual log files for each nodes are generated in the ~/.ros/latest folder (whereas C++ nodes do not have individual logs). Meanwhile, rosout is running within roscore, and it aggregates the log from every nodes and write it to a single rosout.log |
Ah, that is nearly true. The rosconsole var only affects the |
I have cherry-picked your patch to the newly created Thank you! |
Fixes #912.