Suddenly my backend code stopped working. Somewhere right in the middle. Took me hours to find out that the code kept on running, but it no longer showed console.log (backend) output. Yes, it was a lot. When I reduced console output, everything was fine.
So, it looks like there is a limit to what backend console.log can handle. Is this a bug or a feature?
Hi @giri-zano
Could you please give more details about your use case?
Are you using a backend function which reports you console.logs and your browser dev console to see if this function is still working? So it is some sort of health monitoring? Or is it just for debugging purposes?
When you’re saying that it was a lot of logs - what do you mean? Was the function called frequently or it just sends a lot of logs when called once? For how long was the browser session opened? Is it days or hours?
Also, i’d be grateful if you could give at least approx. numbers: how many log lines were you expecting to see and how many you actually saw? If that’s possible to count, of course.
Thank you in advance. Meanwhile I’ll check if there are any limits on our side.
@giri-zano Hello. Wanted to update you with my findings.
Indeed, there is a limitation in console logs you can receive from the backend for safety reasons. Currently it is set to 500 logs. I already asked our developers if it is possible to expand this limit.
Also, frontend logs doesn’t have this limitation.
As a better solution I’d recommend to use our site monitoring tool, which has really powerful logging abilities and can be integrated with Google Stackdriver. You can read more about it here
Yes, I agree, an error “Backend log limit reached (500)” would be better, since any limit you put in will at one time be exceeded by someone. 500 should be enough. The reason that I ran into it was because I stupidly did a global search-replace for "//console.log → console.log. Should not have done that, also started logging again functions that were finished.