Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: split long logs into multiple instead of truncating #177

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rigor789
Copy link
Member

@rigor789 rigor789 commented Jul 25, 2022

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 NativeScript/NativeScript#8657

@farfromrefug
Copy link
Contributor

@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
Copy link
Contributor

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

@edusperoni edusperoni force-pushed the feat/large-log-chunking branch from eb1368e to f6282e6 Compare July 4, 2023 16:04
@cla-bot cla-bot bot added the cla: yes label Jul 4, 2023
@edusperoni
Copy link
Collaborator

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

@rigor789
Copy link
Member Author

rigor789 commented Jul 4, 2023

Thanks @edusperoni 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add an option to print full log.
3 participants