Skip to content

Add system logs broadcast feature#653

Merged
mykola-mokhnach merged 4 commits intoappium:masterfrom
mykola-mokhnach:log_broadcast
Apr 24, 2018
Merged

Add system logs broadcast feature#653
mykola-mokhnach merged 4 commits intoappium:masterfrom
mykola-mokhnach:log_broadcast

Conversation

@mykola-mokhnach
Copy link
Copy Markdown
Contributor

Comment thread lib/commands/log.js Outdated
} else {
log.debug('Established a new system logs listener web socket connection');
}
this.logs.syslog.on('output', (logRecord) => {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

do we want to remove this event listener whenever we stop the logs broadcast?

Copy link
Copy Markdown
Contributor Author

@mykola-mokhnach mykola-mokhnach Apr 20, 2018

Choose a reason for hiding this comment

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

good catch. This has to be fixed for Android as well

Copy link
Copy Markdown
Member

@jlipps jlipps left a comment

Choose a reason for hiding this comment

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

looks good. are there other places we might need to think about removing the listener? for example, what about during session stop? are we already stopping logs broadcast then?

@mykola-mokhnach
Copy link
Copy Markdown
Contributor Author

mykola-mokhnach commented Apr 20, 2018

Yes we do close all opened web sockets, so the listeners will be removed automatically, since they are attached to onClose event

@mykola-mokhnach mykola-mokhnach merged commit 3cc7514 into appium:master Apr 24, 2018
@mykola-mokhnach mykola-mokhnach deleted the log_broadcast branch April 25, 2018 06:06
khanayan123 pushed a commit to khanayan123/appium-xcuitest-driver that referenced this pull request May 10, 2021
* Add system logs broadcast feature

* Remove syslog listener when necessary

* Remove the listener upon web socket close

* Bump ios driver version
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.

2 participants