Closed areese closed 9 months ago
Hey, thanks for the PR
Go packages generally don't implement their own debug printing, since your main package is going to be opinionated about that. What if stdout is used by the executable for some inter-process communication? What if the program uses a custom log package or structured logging (pkg.go.dev/log/slog)?
Happy to add a trace-like API if this is a common use case (https://pkg.go.dev/net/http/httptrace). But I don't think this is the correct API.
@ericchiang that's fine, I can do it a different way. :)
This is only used when you really need to know what's wrong.
Closing this in favor of an httptrace like api that I'll write shortly.
This PR adds a debug flag to the sc context to dump the contents of every APDU to the console.
This is very useful to see what APDU's are being sent to a card.