-
Notifications
You must be signed in to change notification settings - Fork 72
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
Decode diagnostic events in logs #1447
Comments
Looks like this needs to be done in the rpc client to address the discord discussion: https://github.com/stellar/rs-stellar-rpc-client/blob/97b12086ecf53ec928514e1472cc20cf8c58e694/src/log/diagnostic_events.rs#L4 Although the same change could also be done here:
I'm not sure what conditions need to occur to get diagnostic events on the CLI end, in my testing when I trigger an error via invoke I only see events from the rpc client.
|
The cli, not the rpc client, should be logging event details. The cli should be responsible for communicating to the user and the UI. If the rpc client is currently doing so that's probably a hold over to when they were in the same repo and the boundaries and responsibilities of both were blurred and not maintained. |
Makes sense, I changed the PR to remove the logging module and the logging statement in the The follow up PR in the CLI can then add a utility function that encapsulates the |
I just opened a draft PR to resolve this issue which I can open once the RPC changes are merged. #1499 |
One thing I wanted to clarify is that while the cli should be in control of logging things like events, there are some things that are within the scope of the rpc client to log and out-of-scope of the cli, such as raw messages sent and received, and so as part of this change we don't need to rip all logging out of the rpc client. I don't think anything significant needs changing in the PRs, because the only logging I see being removed from the rpc client is events and results, but just wanted to call that out because I realized I didn't communicate as clearly about it as I could have. |
The CLI isn't decoding diagnostic events in its logs which makes it hard to parse with the human eye. There are advantages to having the diagnostic events in XDR and we should probably keep it in the logs in XDR but also output the JSON representation.
Discussed at:
Today this is what is seen:
Ideally with this change this is what the output looks like:
The text was updated successfully, but these errors were encountered: