-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Removed redundent logcat print #950
Conversation
The chromium webview will print an informational log already, we don't need to override the method to do what the webview will already.
After upgrade to cordova android 9.0.0 I'm unable to see any logs from Tested on Android 10, Xiaomi MI 10 SE. |
Using logcat is mainly used for native debugging. Debugging cordova apps you should use the web inspector tools provided by Chrome (for android), or Safari for ios apps. It provides much more robust console API than logcat, + you get your JS breakpoints and other debugging tools. See Remote Debugging webviews for more information how to do this for the Chrome webview. |
Hi. This commit breaks logging in release mode which is very useful for bug reports. Reason: webView print logs only when I propose to add instead of this method something like this.
|
I had a very specific error in my app only on release build for android in which remote debugging is not available ;). Finally I reverted cordova-android back to 8.1.0 and now logging works properly.
Console logs weren't under different tag - I was using logcat without grepping. |
I see. I'd support a PR that re-adds console logging if the app is in release mode and if the app is in debug mode, then fall back to the super.call. |
Platforms affected
Android
Motivation and Context
The chromium webview will print an informational log already,
we don't need to override the method to do what the webview will already.
Closes #914
Description
Simply removes the
onConsoleMessage
message override, since we don't do anything other than to print a logcat message out, which the super class already does, resulting in duplicate logcat prints.Testing
Ran npm test and ensured all existing tests passes.
Checklist
(platform)
if this change only applies to one platform (e.g.(android)
)