tabris-js icon indicating copy to clipboard operation
tabris-js copied to clipboard

Introduce logging of native bridge operations

Open cpetrov opened this issue 4 years ago • 4 comments

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

cpetrov avatar Mar 30 '20 19:03 cpetrov

At what level would you want to log this behavior? in the cli or on device or to the console log?

mpost avatar Mar 31 '20 07:03 mpost

@mpost Those logs could get quite voluminous, so CLI-only logging might be enough and appropriate.

cpetrov avatar Apr 28 '20 12:04 cpetrov

Side note... when building in debug mode, the android client prints the protocol message to the adb logcat.

mpost avatar Apr 28 '20 13:04 mpost

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.

cpetrov avatar Jul 09 '21 12:07 cpetrov