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

Avoid double timestamps in debug log output #129

Merged

Conversation

gavanderhoorn
Copy link
Collaborator

Fixes #96.

The debug logger script no longer prefixes the received-time to log lines, but instead extracts the sent-stamp from the message and prints that.

Note: on my YRC, strftime(..) doesn't appear to take timezones into account -- or I haven't configured things correctly. This leads to a consistent 1 hour delta between time on my development PC and the controller, and consequently all log lines printed appear to be "from 1 hr in the past".

ie: 'MON', 'TUE', etc.

Makes the length of the stamp more predictable.

And append 6 digits of the nanosecond part of the stamp instead of 3 (we have the resolution).
PR Yaskawa-Global#61 added a timestamp to the log message sent out by MotoROS2. Use that timestamp instead of calculating a new one upon reception.

The format of the timestamp prefixed by MotoROS2 is exactly the same as what `debug_listener.py` used to prefix. But due to limitations on the VxWorks side, will likely not take time-zones into account.
So correct method name.
@gavanderhoorn gavanderhoorn added this to the 0.1.1 milestone Aug 17, 2023
@gavanderhoorn
Copy link
Collaborator Author

Tested on the YRC here.

@ted-miller ted-miller merged commit 49f89e5 into Yaskawa-Global:main Aug 17, 2023
5 checks passed
@gavanderhoorn gavanderhoorn deleted the duplicate_stamps_logger_output branch August 17, 2023 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Double timestamps on debug log lines
2 participants