ios
ios copied to clipboard
feat: split long logs into multiple instead of truncating
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 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?
@rigor789 i am intersted in testing this. Any chance to have an alpha runtime with this?
@farfromrefug once the build finishes you can get the .tgz from the artifacts here: https://github.com/NativeScript/ios/actions/runs/5456662035
Thanks @edusperoni 👍