When I run truffle test and my test fails - the log gets polluted with numerous messages which make difficult to read the error message itself and other debug outputs

 Events emitted during test:
      previousOwner: <indexed> 0x0000000000000000000000000000000000000000 (type: address),
      newOwner: <indexed> 0x627306090abaB3A6e1400e9345bC60c78a8BEf57 (type: address)
      from: <indexed> 0x8065F4c7b8c2bf53561af92D9DA2Ea022A0b28Ca (type: address),
      to: <indexed> 0x0d1d4e623D10F9FBA5Db95830F7d3839406C6AF2 (type: address),
      value: 119951999785389 (type: uint256)

    Warning: Could not decode event!

... lots of other events ...


finally useful data

is there any way to hide events from the logs?


Please try to submit a ticket to truffle support: https://www.trufflesuite.com/community with the steps to reproduce. Do you have a public repo that you could share maybe?

  • I'm very confused with your answer, I don't think it's a bug at all, rather default feature of truffle which I yet to figure out how to turn off. – lebed2045 Feb 2 at 22:38

You can search in your node_modules for the lines that log the events. In my case, I used VSCode search (ctrl + shift + f) and searched "Events emitted during the test" in node_modules, then commented out the for loop logging everyting.

New contributor
Martín Schere is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.