I would like to override console.log and call it on my new function.
I try something like this but I get Uncaught TypeError: Illegal invocation
:
I would recommend using: https://github.com/sunnykgupta/jsLogger
Features:
log
, warn
, error
, info
.Is open for modifications and will be updated whenever new suggestions come up.
Disclaimer: I am the author of the plugin.