Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27399] Android: Work around android log truncation limit for Ti.API logging

GitHub Issuen/a
TypeImprovement
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 8.2.0
Fix Version/sn/a
ComponentsAndroid
Labelsn/a
ReporterChristopher Williams
AssigneeUnknown
Created2019-09-13T18:15:59.000+0000
Updated2019-09-17T14:20:48.000+0000

Description

Our test suite suddenly had a mysterious error. The root cause is that a stringified test failure result was longer than an inherent Android log limit. Internal android_log_write caps the messages at 4076 bytes. We do nothing to guard against this or deal with it, so if users call Ti.API.info() with a very long message it will get truncated. Android itself has a hack in place on the Java side to split messages naturally by any newlines inside of them and log each chunk. We could do the same via a JS shim in our common JS code internal to the SDK for Android. (Since the implementation of APIModule is in C++ and would be more difficult to hack this in).

Comments

No comments

JSON Source