-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
How to disable console.log #379
Comments
I probably should add something to the errors to disable warnings. There isn’t anything easy to do until I update that though. Do you need function overloading? That itself can lead to bugs... :s |
As I think about this more, I think future versions won’t allow ambiguous calls. If there is a I’ll experiment with this in the v5 branch tomorrow. For v4, I’ll just add an |
You should now be able to set the internal log level:
Let me know if that works for you. Thanks! :) |
Closing this now, but I monitor closed issues. Let me know if there are any issues, or feel free to re-open. :) Thanks! :) |
How do I disable log in v5 ? |
Ah yes, I noticed a few weeks ago I have not added that yet. I will add it today. |
Any update on this ? |
Ah yes, I just added this the other day, but haven’t published the change yet. I’ll do that today with a few other changes that need to be published. |
By the way, this should be available in the latest published version. :) |
I think you need |
With const ethers = require('ethers');
ethers.utils.Logger.setLogLevel('off'); I get the following error :
Was it added in beta.175 ? |
There was a bug that prevented warnings from being properly suppressed. Please try out Let me know if there are any problems. :) |
I still get the issue
I guess it is related to how other project depend on other ethers packages it should be |
I workaround it by adding
|
I'm using 5.0.7 in my ts rollup build:
Shouldn't this work? Is there an export of |
It’s an enum, so can you try |
Normally our application logging with a standard format to console in docker environment, the logging is directly capture from console output. I am facing an issue that the smart contract having multiple functions with a same name, the ethers will output a warning message to console.
WARNING: Multiple definitions for XXXX
Do you have any idea to disable the console.log inside ethers library?
The text was updated successfully, but these errors were encountered: