Looking for a way to log on my server all console events shown on my visitor's browser console. Not just what I'm firing with console.log, but everything... Is there a way?
- Something like this? stackoverflow.com/questions/8000009/…blueren– blueren2017-11-28 09:53:35 +00:00Commented Nov 28, 2017 at 9:53
- Possible duplicate of Is there a way in JavaScript to listen console events?blueren– blueren2017-11-28 09:53:49 +00:00Commented Nov 28, 2017 at 9:53
- Refer this: <stackoverflow.com/questions/8000009/…>user8956962– user89569622017-11-28 09:54:06 +00:00Commented Nov 28, 2017 at 9:54
Add a comment |
1 Answer
Yes you can just override console method like
var logFn = console.log; console.log = function(arg1) { // do your work on log information logFn('your console hacked') } console.error = function(arg1) { // do your work on error part logFn('your console hacked') } you will find on console only one message 'your console hacked' you can customize according to you.