Skip to content

Fix getting ios simulator device logs #2093

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

Merged
merged 1 commit into from
Oct 6, 2016
Merged

Conversation

rosen-vladimirov
Copy link
Contributor

iOS Simulator device logs are printed directly to process.stdout from the ios-sim-portable. However this makes it really difficult to filter the logs and provide them to different callers (for example AppBuilder CLI, NativeScript CLI, Proton).
In order to fix this, use the ios-sim-portable just to start the process of getting device logs. Filter them in the CLI itself.
Also change the logic in ios-log-filter to use process pid in case it's passed. For iOS Simulator we have filtered logs based on the PID of the application. With these changes, simulator logs are passed to ios-log-filter, so that's why we need process' PID there.
When application is restarted (during livesync for example), we set the PID again and the filter will use the new PID.

iOS Simulator device logs are printed directly to process.stdout from the ios-sim-portable. However this makes it really difficult to filter the logs and provide them to different callers (for example AppBuilder CLI, NativeScript CLI, Proton).
In order to fix this, use the ios-sim-portable just to start the process of getting device logs. Filter them in the CLI itself.
Also change the logic in ios-log-filter to use process pid in case it's passed. For iOS Simulator we have filtered logs based on the PID of the application. With these changes, simulator logs are passed to ios-log-filter, so that's why we need process' PID there.
When application is restarted (during livesync for example), we set the PID again and the filter will use the new PID.
@rosen-vladimirov rosen-vladimirov added this to the 2.4.0 milestone Oct 5, 2016
@rosen-vladimirov rosen-vladimirov self-assigned this Oct 5, 2016
@rosen-vladimirov
Copy link
Contributor Author

rosen-vladimirov commented Oct 5, 2016

Ping @tzraikov
Changes in mobile-cli-lib are here: telerik/mobile-cli-lib#815
Changes in ios-sim-portable are here: NativeScript/ios-sim-portable#79

@rosen-vladimirov rosen-vladimirov merged commit fa8430f into master Oct 6, 2016
@rosen-vladimirov rosen-vladimirov deleted the vladimirov/sim-logs branch October 6, 2016 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant