ios icon indicating copy to clipboard operation
ios copied to clipboard

feat: split long logs into multiple instead of truncating

Open rigor789 opened this issue 3 years ago • 4 comments

NSLog has a 1024 character limit, and anything beyond is truncated with <...>. This PR aims to split longer logs into multiple NSLog calls when necessary.

This is already possible on Android by setting the maxLogcatObjectSize boolean under the android key in the config.

The goal is to add a similar config option for iOS as well.

Todos:

  • [ ] make the max length configurable
  • [ ] add the new config to the type definitions
  • [ ] check if we need to use ~1000 or if we can bump the max length to 1024 or 1023 before it actually truncates...

closes https://github.com/NativeScript/NativeScript/issues/8657

rigor789 avatar Jul 25 '22 17:07 rigor789

@rigor789 will the result of the splitted log be on the same line in the console? Like let s say it is a JSON.stringify which is splitted. Will you be able to copy it, paste it as a correct JSON string?

farfromrefug avatar Aug 25 '22 08:08 farfromrefug

@rigor789 i am intersted in testing this. Any chance to have an alpha runtime with this?

farfromrefug avatar Jul 04 '23 14:07 farfromrefug

@farfromrefug once the build finishes you can get the .tgz from the artifacts here: https://github.com/NativeScript/ios/actions/runs/5456662035

edusperoni avatar Jul 04 '23 16:07 edusperoni

Thanks @edusperoni 👍

rigor789 avatar Jul 04 '23 18:07 rigor789