Let's suppose this solidity function:
function myfunction() external {
emit myevent("hello");
...
revert();
}
As you can see, the function fires an event.
In some cases, the function will revert a few lines later.
In this case, i will see a failed transaction in the blockchain (with a blockchain explorer). This is normal.
But My event is not visible in this failed transaction. This is a problem because Events are a kind of log for me and it can be usefull to understand why the transaction failed.
Is there a way to fire an event and be sure it will apears in the transaction, even if it fails.
If not, is there a way to "log" some informations with another way than events.
Thanks a lot