Skip to content
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

[rosgraph] Fix rospy default rosconsole format for consistency with roscpp #879

Conversation

wkentaro
Copy link
Contributor

@wkentaro wkentaro commented Aug 26, 2016

Close #876

@tfoote
Copy link
Member

tfoote commented Aug 26, 2016

+1 It looks like this repo is failing the newly added cmake warnings settings.

@dirk-thomas
Copy link
Member

The CMake warnings have been addressed by ros/genmsg#65.

@tfoote
Copy link
Member

tfoote commented Aug 26, 2016

@ros-pull-request-builder retest this please

@dirk-thomas
Copy link
Member

This is not going to pass until genmsg is released.

@dirk-thomas
Copy link
Member

@ros/ros_team What do you think? Should we merge this and make the default behavior the same or not and keep the currently different default in rospy?

msg += ' [%f]' % self._get_time()
msg += ' %s\n' % record_message
t = time.time()
msg = msg.replace('${time}', '%f' % t)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the case that simtime is being used, roscpp prints both the wall clock and the sim time, like this:

[INFO] [${walltime}, ${simtime}]: ${message}

Previously Python did:

[INFO] [WallTime: ${walltime}] [${simtime}] ${message}

With the [${simtime}] part being excluded if simtime is not being used.

This patch doesn't work for me, since it no longer prints wall and sim time at the same time, it now prints wall or sim time. This is both different from the current behavior and different from roscpp (which is the goal of this pr as far as I gather).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I think I fixed it.

@wjwwood
Copy link
Member

wjwwood commented Sep 6, 2016

I'm ok with changing the logging format output in Kinetic so that it is consistent with roscpp. We might want to let people know in a high profile way, say with an email to ros-users@, and at that point ask if anyone is depending on the format of the log output in any serious way.

I could imagine people who are parsing log output for some purpose like scraping meta data from log files. This hypothetical user would be broken by a change like this.

@tfoote
Copy link
Member

tfoote commented Sep 7, 2016

I think it's worth making the default consistent. In our email we can give the environment variable to set if you need the old behavior. I think it's unlikely that there will be much hard coded to that format since it's only for rospy logging. Roscpp clearly has a different format. Though we should match the time representation as mentioned by @wjwwood

@wkentaro wkentaro changed the title [rospy] Fix rospy default rosconsole format for consistency with roscpp [rosgraph] Fix rospy default rosconsole format for consistency with roscpp Sep 19, 2016
@wkentaro wkentaro force-pushed the rospy-roscpp-rosconsole-format-consistency branch from eca84fb to 4942c9c Compare September 19, 2016 07:17
@wkentaro
Copy link
Contributor Author

I think I fixed the code following the reviews. Could you please review again?

@dirk-thomas
Copy link
Member

Please see wkentaro#1 for proposed changes to your PR.

…ency

Rospy roscpp rosconsole format consistency
@dirk-thomas
Copy link
Member

dirk-thomas commented Oct 21, 2016

I documented the new unified behavior in http://wiki.ros.org/action/diff/rosconsole?action=diff&rev1=71&rev2=72

@ros/ros_team Does this look ready-to-merge to you?

@wkentaro
Copy link
Contributor Author

@dirk-thomas Thanks.

@wjwwood
Copy link
Member

wjwwood commented Oct 21, 2016

lgtm

@dirk-thomas
Copy link
Member

Thank you. I have cherry-picked the change in 7be2c06.

@wkentaro wkentaro deleted the rospy-roscpp-rosconsole-format-consistency branch October 21, 2016 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants