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

disable ethers logging #257

Merged
merged 1 commit into from
Mar 29, 2022
Merged

disable ethers logging #257

merged 1 commit into from
Mar 29, 2022

Conversation

scott-silver
Copy link
Contributor

Our scenario output is dominated by duplicate definition - //...

We can turn that off using ethers.utils.Logger.setLogLevel.

Not sure if we'd be losing other useful information, but it makes things a lot more readable:

Before:

image

After:

image

source: ethers-io/ethers.js#379 (comment)

Copy link
Contributor

@kevincheng96 kevincheng96 left a comment

Choose a reason for hiding this comment

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

🙌 Would love for these pesky logs to go away. Though I'm not sure if it will be masking any other warnings that we might care about. Let's see what Jared and Geoff think.

@jflatow
Copy link
Contributor

jflatow commented Mar 23, 2022

Yeah these logs are super annoying, but seems like we might want some logging at some point?

@scott-silver
Copy link
Contributor Author

scott-silver commented Mar 25, 2022

@jflatow yeah, we probably do want these logs some of the time. but i've been using this patch locally the last few days and it's been really helpful to actually be able to read the scenario logs

maybe we could optionally disable it?

@jflatow
Copy link
Contributor

jflatow commented Mar 25, 2022

@jflatow yeah, we probably do want these logs some of the time. but i've been using this patch locally the last few days and it's been really helpful to actually be able to read the scenario logs

maybe we could optionally disable it?

Yeah what about adding an env var to disable like hre.ethers.utils.Logger.setLogLevel(hre.ethers.utils.Logger.levels[env.HRE_LOG_LEVEL || 'OFF'])

@scott-silver
Copy link
Contributor Author

@jflatow I updated this to be a flag on the scenario task. So now you can run:

yarn scenario --quiet

if you want to reduce the output.

@jflatow jflatow merged commit 7b4bd0b into main Mar 29, 2022
scott-silver added a commit that referenced this pull request Apr 21, 2022
jflatow pushed a commit that referenced this pull request Apr 21, 2022
@jflatow jflatow deleted the silver/ethers-log-level branch May 26, 2022 20:05
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