Skip to content

[RSDK-9110] Add trace debug logging #380

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

Merged
merged 2 commits into from
May 12, 2025

Conversation

njooma
Copy link
Member

@njooma njooma commented May 1, 2025

Add trace debug logging. You can enable/disable trace logging by calling enableDebugLogging or disableDebugLogging on a client.

Caveat: You have to do it on a client. When you call fromRobot, you get the base class back. So you'll have to cast it.

final myArm = Arm.fromRobot(robot, "my-arm");
final armClient = myArm as ArmClient;
armClient.enableDebugLogging(traceKey: "arm-logger");
await armClient.move()
armClient.disableDebugLogging()

Got inspiration from
viamrobotics/viam-python-sdk#747
viamrobotics/viam-typescript-sdk#384

@njooma njooma requested a review from a team as a code owner May 1, 2025 20:27
@njooma njooma requested review from stuqdog and lia-viam May 1, 2025 20:27
Copy link
Member

@stuqdog stuqdog left a comment

Choose a reason for hiding this comment

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

nice, lgtm!

@njooma njooma merged commit aeb091c into viamrobotics:main May 12, 2025
4 checks passed
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.

2 participants