Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Welcome to Code Forum!
Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.
Yes - I found a way around it, it actually declares a logger object for which I can directly fetch an array and then inspect the contents for what I want ...
I think this bit if trickery I was doing above is fragile and should be avoided if possible.
Without sharing the specific logs, the pattern I observe is this:
1. messages without a timestamp in them are captured in both cases
2. messages with the timestamp are not captured in subsequent cases, but the interesting thing is, they're still written to console.log. I kept the original...
I don't think it has to do with the logs becoming too large and perhaps rolling over as I tried rewriting the above to update a boolean flag to true when matched and the same thing happens, it only gets set to true for the first iteration.
I see the same log message in latter instances.
I am overwriting console.log so that I can observe an event and take action on it.
This is done via go, when I launch a new tab by clicking a link, so it happens quickly.
window.originalLog = console.log;
window.capturedLogs = [];
console.log = (...args) => {
window.capturedLogs.push(...args)...