console.log results in Anvil output #5778
Unanswered
sebastiandine
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using the library
forge-std/console.sol
in a contract for debugging purposes and execute the corresponding functions on a local Anvil network. I use Cast to send the transaction to the network.When I check the log of the Anvil network after the execution of a function that uses
console.log
, I see several outputs after the RPC methodeth_estimateGas
. Why is it printed that many times? My expectation was that each log is only printed once after RPC methodeth_sendRawTransaction
, which it actually does. Can someone explain these multiple logs?Here is an example of the Anvil logs. In the corresponding function, I invoke
console.log
as follows:console.log("test")
.Beta Was this translation helpful? Give feedback.
All reactions