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

Update httpclient.nim move log to trace #235

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Ivansete-status
Copy link
Contributor

In nwaku, when the node's user sends a request to their infura RPC, the token is being printed by default.

This PR aims to avoid printing it by default and just if someone is interested in debugging any possible issue

In nwaku, when the node's user sends a request to their infura RPC, the token is being printed by default.

This PR aims to avoid printing it by default and just if someone is interested in debugging any possible issue
vpavlin
vpavlin previously approved these changes Jan 22, 2025
Copy link
Member

@vpavlin vpavlin left a comment

Choose a reason for hiding this comment

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

LGTM, this should also help with spammy output of this lib in nwaku and codex in debug mode

Actually, @Ivansete-status would you mind going through the other files as well? The address is being logged again a few lines below for batch request and in websocket clients etc.

It would be probably good to not solve this ad-hoc of this one particular line, but make it in the whole lib.

WDYT?

@vpavlin vpavlin self-requested a review January 22, 2025 09:36
@vpavlin vpavlin dismissed their stale review January 22, 2025 09:37

Adding comments

Copy link

@chaitanyaprem chaitanyaprem left a comment

Choose a reason for hiding this comment

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

wouldn't the token get logged if trace level is enabled which i think is possible?

@vpavlin
Copy link
Member

vpavlin commented Jan 22, 2025

It would, but if the goal of the library is to log the address, we cannot prevent logging the token which is part of the address (unless some obfuscation can be done). Not sure what a more reasonable approach than moving it to trace would be

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.

3 participants