-
-
Notifications
You must be signed in to change notification settings - Fork 197
Disable system log in TNS 4 console #3727
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
Comments
This is a headache for debugging. Any workarounds yet? |
@NickIliev This issue is not specific to Nativescript Vue. When running on iOS, the console gets flooded with system logs related to networking, geolocation services, etc. |
The only workaround I have so far is to manually edit preFilter(data, currentLine) {
return currentLine.length < 1 ||
currentLine.indexOf("WebProcessProxy") !== -1 ||
currentLine.indexOf("ProcessAssertion") !== -1 ||
currentLine.indexOf("ProcessThrottler") !== -1 ||
currentLine.indexOf("locationd") !== -1 ||
currentLine.indexOf("SecTaskCopyDebugDescription") !== -1 ||
currentLine.indexOf("NativeScript loaded bundle") !== -1 ||
(currentLine.indexOf("assertion failed:") !== -1 && data.indexOf("libxpc.dylib") !== -1);
} This is obviously a hack (and still misses a ton of system logs), but at least (for now) I can filter out the noisiest system logs so I can see more of my own. EDIT: This works better... preFilter(data, currentLine) {
return currentLine.length < 1 || currentLine.indexOf("CONSOLE") === -1 ;
} |
@speigg thanks for your workaround, it works great 👍 Thing that I don't understand is there was a PR which has been created for this problem : But while using real iOS device, we still get too many useless logs, but if we use Xcode, then the debugger console is clear and contains only useful log. So there is certainly a solution to get the Xcode logs, instead of current nativescript iOS logs |
easy workaround: tns debug ios --bundle | grep CONSOLE If you need to see the chrome devtools link: tns debug ios --bundle | grep 'CONSOLE|chrome' Still, this is just a workaround, you will not see any fatal errors from nativescript etc ... so you need to adjust the grep command ... |
This seems to be either the same issue or at least related to #3544. One problem with filtering, e.g. with |
Any concerns/objections to have @speigg 's solution as the default for
|
No sir, you can go 👍 |
@GrEg00z where can this ios-log-filter.js file be found? |
@RacknerFrank depending on where your (global) node modules are located it's
|
@lambourn Wouldn't that strip all |
@RacknerFrank : on windows 10, it's located here :
As said @kenny-evitt, the right one should be in nativescript\lib\services, but not sure, I edited the both to be sure |
FYI I haven’t looked at this in a long time so I don’t remember the details, but if I recall correctly I don’t think my workaround works for multi-line console output. (I could be wrong). |
Hello,
I'am using NativeScript Vue for developing my app, however, since upgrading to TNS 4, the tns console output log is too much verbose with system logging messages. Is there any way to disable all these logs and print only application level logs ?
Every time I run the app, it's impossible to see my debug log since there are a lot of system logs, for example:
Issue occurs since TNS 4.0
To recreate the issue
tns [run|debug] [ios|andorid]
for any NativeScript project.Thank you for any help.
The text was updated successfully, but these errors were encountered: