[TIMOB-27399] Android: Work around android log truncation limit for Ti.API logging
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | None |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 8.2.0 |
Fix Version/s | n/a |
Components | Android |
Labels | n/a |
Reporter | Christopher Williams |
Assignee | Unknown |
Created | 2019-09-13T18:15:59.000+0000 |
Updated | 2019-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).
No comments