Recently I have been setting up logging for my web app. I am using NodeJS in the backend and using Bunyan to log any errors and etc there. I want to be able to also write any console logs and client errors from the frontend to the same file. Is this possible? or if you have any suggestions that would be great.
Backend logging is currently working and is logging to a file as intended. I want to log any errors and etc from frontend to the same file.
Cheers
You can add a api/route that fron-end code calls and that route uses Bunyan to logs the message received.