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

Add an option to print full log. #8657

Open
huyaxiong opened this issue Jun 19, 2020 · 9 comments · Fixed by #9456 · May be fixed by NativeScript/ios#177
Open

Add an option to print full log. #8657

huyaxiong opened this issue Jun 19, 2020 · 9 comments · Fixed by #9456 · May be fixed by NativeScript/ios#177
Assignees

Comments

@huyaxiong
Copy link

Is your feature request related to a problem? Please describe.
Sometimes I want to track an issue by using console.log, the console could only print part of the logs, if its too long it would be omitted like this.
image

Describe the solution you'd like
Add an option to print full log

Describe alternatives you've considered

Additional context

@rigor789
Copy link
Member

On Android you can set the maxLogcatObjectSize option in the app/package.json

  "android": {
    "v8Flags": "--expose_gc",
    "markingMode": "none",
    "maxLogcatObjectSize": 10000
  },

On iOS - I'm not aware of a flag, but you can check the logs in the chrome debugger, and it should not truncate them!

@rigor789 rigor789 self-assigned this Jun 19, 2020
@rigor789
Copy link
Member

Looked into this again today, Apple's NSLog that now uses os_log under the hood has a hard limit at 1024 bytes, anything over that gets truncated. There's not easy way around it at this point - the chrome debugger is still unaffected, since it's not going through NSLog/os_log.

Will think about an alternative, but low priority.

@farfromrefug
Copy link
Collaborator

@rigor789
Copy link
Member

@farfromrefug don't think that would work - but can certainly try it. The main issue why I think it wouldn't work is because it may not be printed the same way (the syslog style) and the CLI wouldn't see the logs.

@farfromrefug
Copy link
Collaborator

not sure but I know o do see syslogs when running app on device.

@NathanWalker
Copy link
Contributor

I'm going to keep this open as the referenced PR improves some things but there's more that can be done here.

@farfromrefug
Copy link
Collaborator

@NathanWalker what s the relation here? how does the params for logs fixes this one?

@NathanWalker
Copy link
Contributor

@NathanWalker what s the relation here? how does the params for logs fixes this one?

Not much relation other than log related. It was referenced on pr and auto close on merge, thus why I reopened this.

@farfromrefug
Copy link
Collaborator

@NathanWalker ok sorry misunderstood

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