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

Use appium-ios-device instead of idevicesyslog #1000

Merged
merged 6 commits into from Jul 9, 2019
Merged

Conversation

@umutuzgur
Copy link
Member

@umutuzgur umutuzgur commented Jul 3, 2019

Changes

  • Separate device and simulator logs
  • Remove the dependency to IOSLog from appium-ios-driver
  • Let them inherit shared logic from IOSLog
  • Use SyslogService from appium-ios-device

TODO

  • Remove realDeviceLogger capability completely
firstLine = false;
}
} else {
this.logRow += stdout;
Copy link
Contributor

@mykola-mokhnach mykola-mokhnach Jul 3, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there might be a potential memory leak

Copy link
Member Author

@umutuzgur umutuzgur Jul 4, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be fine. The code already runs in appium-ios-driver for years. I wan't to clean it up later

@umutuzgur umutuzgur requested a review from mykola-mokhnach Jul 4, 2019
onOutput (prefix = '') {
const logs = this.logRow.split('\n');
onOutput (logRow, prefix = '') {
const logs = _.cloneDeep(logRow).split('\n');
Copy link
Contributor

@mykola-mokhnach mykola-mokhnach Jul 4, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather clone the result of split, because internally string.split does not create new string instances, but rather pointers to the original big string (which prevents it to be garbage collected if at least one of these slices is still used somewhere)

Copy link
Member Author

@umutuzgur umutuzgur Jul 9, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@umutuzgur umutuzgur force-pushed the use_ios_device_syslog branch from e22f3c8 to acefab6 Jul 9, 2019
xcodeVersion: this.xcodeVersion,
});

if (this.isRealDevice()) {
Copy link
Contributor

@mykola-mokhnach mykola-mokhnach Jul 9, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a ternary operator might take less lines of code ;)

@umutuzgur umutuzgur merged commit a17442b into master Jul 9, 2019
8 of 10 checks passed
@umutuzgur umutuzgur deleted the use_ios_device_syslog branch Jul 9, 2019
khanayan123 pushed a commit to khanayan123/appium-xcuitest-driver that referenced this issue May 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants