wry
                                
                                 wry copied to clipboard
                                
                                    wry copied to clipboard
                            
                            
                            
                        Capturing console messages
Is your feature request related to a problem? Please describe. I'm running a service that uses a webview and I'd like to monitor it externally (system logs), in case there are errors with scripts that are running, etc.
Describe the solution you'd like
I think the simplest solution would be some method to hook into the webview's console.  AFAIK Android has an onConsoleMessage callback, I'm not sure about others (I'm on linux).
Describe alternatives you've considered
In my case I'm most interested in errors, so if there were a way to add a global error handler that'd work too.  Javascript does have a window error callback but AFAICT it doesn't trigger in all situations.
Additional context This may not be possible, but I figured it'd be worth discussing.