gremlins.js icon indicating copy to clipboard operation
gremlins.js copied to clipboard

Detailed logs

Open yuriipaneiko opened this issue 5 years ago • 3 comments

🚨 The issue tracker is not for implementation questions 🚨 Is it possible to get detailed logs during testing? For example: while gremlins make chaos on my site, some error is logged to console, but i want to know what caused this error. I need to handle this by my own, or there are already implemented method for this?

yuriipaneiko avatar Oct 16 '20 10:10 yuriipaneiko

Hello,

I think customizing the logger is what you're looking for. Let me know if it's not.

HALLERPierre avatar Oct 16 '20 13:10 HALLERPierre

So i need just to paste this peace of code? Because i doesn't see any file with logs in my folder. Could you provide working example? Of course if it possible.

yuriipaneiko avatar Oct 16 '20 13:10 yuriipaneiko

gremlins.js is capable of logging what it has done, but you will need to follow the stack trace determine what in your code caused the gremlin's action to generate an error. I recommend starting here: https://developers.google.com/web/tools/chrome-devtools/javascript/reference

So i need just to paste this peace of code?

That code allows you to adjust what is done when gremlins.js would normally log a message. For example, you could have the messages sent to an array and then the array could be save to a .txt file at the end of the run.

Because i doesn't see any file with logs in my folder. Could you provide working example? Of course if it possible.

The default implementation only displays messages in the console. Anything beyond that is really outside of the scope of this project and is better suited for somewhere like stackoverflow. https://github.com/eligrey/FileSaver.js/ might be of help, but again, this really isn't the place for your question since it is very specific to your own project.

This issue should be closed.

thkruz avatar Dec 13 '20 03:12 thkruz