You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, ethers, or more precisely @ethersproject/random is spamming warn log output in some environments where there's no crypto package available. I'm running a workflow engine with v8 isolates spawning at a very high rate (temporal.io), causing every code path that imports ethers to spam the log output "WARNING: Missing strong random number source".
First of all, I strongly believe that no module should ever run any code on import. Secondly, I believe that if a package produces any sort of log output, it should be built using a replaceable adapter so that developers can either inject their own logging engine or mute the logs if they want.
Ethers is currently producing 1.5GB of logs per week for me :-P
logger.warn("WARNING: Missing strong random number source");
) I believe that this line should simply be removed altogether. It adds no additional value as the actual implementation, whenever it's called, is going to throw an exception anyways.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, ethers, or more precisely @ethersproject/random is spamming
warn
log output in some environments where there's nocrypto
package available. I'm running a workflow engine with v8 isolates spawning at a very high rate (temporal.io), causing every code path that importsethers
to spam the log output"WARNING: Missing strong random number source"
.First of all, I strongly believe that no module should ever run any code on import. Secondly, I believe that if a package produces any sort of log output, it should be built using a replaceable adapter so that developers can either inject their own logging engine or mute the logs if they want.
Ethers is currently producing 1.5GB of logs per week for me :-P
More specifically for this particular case (
ethers.js/packages/random/src.ts/browser-random.ts
Line 28 in 73a46ef
Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions