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

Add signature collection logs #330

Merged
merged 1 commit into from
Jun 14, 2024
Merged

Add signature collection logs #330

merged 1 commit into from
Jun 14, 2024

Conversation

cam-schultz
Copy link
Collaborator

Why this should be merged

Adds additional logs in the signature collection code to aid debugging.

How this works

How this was tested

How is this documented

Comment on lines +322 to +324
zap.String("warpMessageID", unsignedMessage.ID().String()),
zap.String("sourceBlockchainID", r.sourceBlockchain.GetBlockchainID().String()),
zap.String("destinationBlockchainID", r.relayerID.DestinationBlockchainID.String()),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not necessary in this PR, but could be cleaner to have some logging helpers for repeated variables (such as "warpMessageID") to avoid the string literals in so many places.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've thought about this some, but haven't found any satisfying solution. Helpers would reduce repitition in the code, but aren't the most extensible or generic. A decorator-type extension to logger.Logger that always logs certain fields and still takes additional arguments would be ideal.

@cam-schultz cam-schultz merged commit 3dc9967 into main Jun 14, 2024
7 checks passed
@cam-schultz cam-schultz deleted the signature-logs branch June 14, 2024 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants