Hi Simon,
For a customer I created a client side logger (long time ago). Capturing all in console output and send it to an external server.
Widget was never completed and implemented fully.
The widget was overwriting console.log warn and error; capturing the output and forward it to an URL with additional information. This could be captured with custom request handler written in java that that logs the information in to the console.
For app with a large user base it is recommended to send the logs to and external system.
Cheers Andries