Recently I faced a problem with unhandled exception in backend project. It was a problem with the code in backend project, and all I saw in the browser console is "500 internal error" without any stacktrace or other helpful details.
Right now we have logging in backend project only to console, what is not much helpful for production mode (e.g. we had a bug what was not reproducible locally, only on rasp).
What do you think about adding another transport level for winston logger to write errors to MongoDB?
Part 2 (optional):
Add API to backend and page to frontend where we can load and see these logs (before it, it's fine just to query them directly via Mongo Shell).
P.S. Also, it's possible to write logs into the file - it would be easier to implement, but harder to get without API / separate page.
Recently I faced a problem with unhandled exception in backend project. It was a problem with the code in backend project, and all I saw in the browser console is "500 internal error" without any stacktrace or other helpful details.
Right now we have logging in backend project only to console, what is not much helpful for production mode (e.g. we had a bug what was not reproducible locally, only on rasp).
What do you think about adding another transport level for winston logger to write errors to MongoDB?
It could be performed by the following steps:
Part 2 (optional): Add API to backend and page to frontend where we can load and see these logs (before it, it's fine just to query them directly via Mongo Shell).
P.S. Also, it's possible to write logs into the file - it would be easier to implement, but harder to get without API / separate page.