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

Enables a tracker to forward log messages to the server, and the server to send the log messages to the UI. #1234

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jabberrock
Copy link
Contributor

@jabberrock jabberrock commented Nov 11, 2024

  1. PROTOCOL_LOG_SUPPORT which determines if the server supports forwarding log messages
  2. PACKET_LOG (26) which is the UDP packet that the tracker sends to the server
  3. Device.logMessages which is the new field for the UI to receive log messages

Device logs are displayed in the GUI under the specified tracker, because there is no place to put device-specific information, nor is there a good way to separate tracker-specific logs from each other. This means that aux trackers will show the same device logs as the main tracker.

Related PRs:
SlimeVR/SolarXR-Protocol#153
SlimeVR/SlimeVR-Tracker-ESP#361

image

2024-11-11.12-43-26-00.00.29.546-00.00.48.967.mp4

…er to send the log messages to the UI.

1. `PROTOCOL_LOG_SUPPORT` which determines if the server supports forwarding log messages
2. `PACKET_LOG (26)` which is the UDP packet that the tracker sends to the server
3. `Device.logMessages` which is the new field for the UI to receive log messages
@loucass003
Copy link
Member

It is cool, i mostly dont like how it looks. I would create another block below the tracker settings with a nice title
Device Logs

And put the logs text behind a darker color. Similar to the actual serial console in the server.

@loucass003
Copy link
Member

loucass003 commented Feb 6, 2025

From the look of the code it also looks like all trackers will be sending their logs to the server no matter what. Imo this is not good. The server should only send the logs through the solarxr protocol when needed.

You would need a packet to Start listening for logs from the gui and stop listening.

Also that pose another question. Should the server really be always listening for tracker logs without asking for it. this seem like a lot of packets for a debug feature.

@Eirenliel
Copy link
Member

agree, @loucass003

@jabberrock
Copy link
Contributor Author

Tracker -> Server
Each tracker sends about 30 messages at startup, and then 1 message every minute. I don't think that's going to overwhelm the server. When there's a problem with the tracker, you want to be see what happened in the past.

Server -> UI
Agreed that the UI shouldn't request the logs unless needed. Would requesting the logs when you're viewing a specific tracker be acceptable?

@jabberrock
Copy link
Contributor Author

I imagine this will simplify debugging problems for customers. It could be super useful for things like calibration. It may lead firmware to put in more logs, e.g. so that customers can figure out why a tracker's acting weird.

@Eirenliel
Copy link
Member

Server -> UI Agreed that the UI shouldn't request the logs unless needed. Would requesting the logs when you're viewing a specific tracker be acceptable?

@jabberrock yeah

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: GUI Related to the GUI Area: Hardware Protocol Related to communication with hardware/software trackers Area: Server Related to the server Status: Blocked by other issue Progress cannot be made until linked issue is resolved Type: Enhancement Adds or improves a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants