Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
1245aa79
Commit
1245aa79
authored
Sep 03, 2015
by
Ian Fischer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correctly handle logging when devices are disconnected or logging processes otherwise crash.
parent
5177b7d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
sky_tool
packages/flutter/lib/sky_tool
+14
-1
No files found.
packages/flutter/lib/sky_tool
View file @
1245aa79
...
...
@@ -512,7 +512,12 @@ class AndroidDevice(object):
log_process
=
subprocess
.
Popen
(
cmd
,
bufsize
=
1
,
stdout
=
subprocess
.
PIPE
)
while
True
:
try
:
sys
.
stdout
.
write
(
'ANDROID: '
+
log_process
.
stdout
.
readline
())
log_line
=
log_process
.
stdout
.
readline
()
if
log_line
==
''
:
if
log_process
.
poll
()
!=
None
:
logging
.
error
(
'The Android logging process has quit unexpectedly. Please call the "logs" command again.'
)
break
sys
.
stdout
.
write
(
'ANDROID: '
+
log_line
)
sys
.
stdout
.
flush
()
except
KeyboardInterrupt
:
break
...
...
@@ -635,6 +640,10 @@ class IOSDevice(object):
while
True
:
try
:
log_line
=
log_process
.
stdout
.
readline
()
if
log_line
==
''
:
if
log_process
.
poll
()
!=
None
:
logging
.
error
(
'The iOS logging process has quit unexpectedly. Please call the "logs" command again.'
)
break
if
re
.
match
(
r'.*SkyShell.*'
,
log_line
)
is
not
None
:
sys
.
stdout
.
write
(
'IOS DEV: '
+
log_line
)
sys
.
stdout
.
flush
()
...
...
@@ -757,6 +766,10 @@ class IOSSimulator(object):
while
True
:
try
:
log_line
=
log_process
.
stdout
.
readline
()
if
log_line
==
''
:
if
log_process
.
poll
()
!=
None
:
logging
.
error
(
'The iOS Simulator logging process has quit unexpectedly. Please call the "logs" command again.'
)
break
if
re
.
match
(
r'.*SkyShell.*'
,
log_line
)
is
not
None
:
sys
.
stdout
.
write
(
'IOS SIM: '
+
log_line
)
sys
.
stdout
.
flush
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment