tabris-js
tabris-js copied to clipboard
Introduce logging of native bridge operations
Problem description
In particular cases (especially when debugging Tabris.js and Tabris.js plugins) it is useful to be able to inspect a log of the operations sent over the native bridge.
Expected behavior
Introduce an API to enable logging of the operations sent over the native bridge. Provide a way to filter certain kinds of operations and operations concerning a certain widget.
Environment
- Tabris.js version: 3.x
At what level would you want to log this behavior? in the cli or on device or to the console
log?
@mpost Those logs could get quite voluminous, so CLI-only logging might be enough and appropriate.
Side note... when building in debug mode, the android client prints the protocol message to the adb logcat.
As discussed with @karolszafranski , we might want to store the output to a file instead of streaming it together with the console log output, e.g. similarly to how we dump the local storage contents with a keyboard shortcut. We should also consider providing an option to clear the buffer to limit irrelevant information stored to the output file.