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
05113d58
Commit
05113d58
authored
Feb 10, 2016
by
Devon Carew
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix an issue with logging ios simulator output
parent
b2c710dd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
logs.dart
packages/flutter_tools/lib/src/commands/logs.dart
+1
-1
device_ios.dart
packages/flutter_tools/lib/src/ios/device_ios.dart
+10
-5
No files found.
packages/flutter_tools/lib/src/commands/logs.dart
View file @
05113d58
...
...
@@ -50,7 +50,7 @@ class LogsCommand extends FlutterCommand {
readers
.
add
(
device
.
createLogReader
());
}
printStatus
(
'
Logging for
${readers.join(', ')}
...
'
);
printStatus
(
'
Showing logs for
${readers.join(', ')}
:
'
);
List
<
int
>
results
=
await
Future
.
wait
(
readers
.
map
((
DeviceLogReader
reader
)
async
{
int
result
=
await
reader
.
logs
(
clear:
clear
);
...
...
packages/flutter_tools/lib/src/ios/device_ios.dart
View file @
05113d58
...
...
@@ -377,8 +377,11 @@ class IOSSimulator extends Device {
void
clearLogs
()
{
File
logFile
=
new
File
(
logFilePath
);
if
(
logFile
.
existsSync
())
logFile
.
delete
();
if
(
logFile
.
existsSync
())
{
RandomAccessFile
randomFile
=
logFile
.
openSync
(
mode:
FileMode
.
WRITE
);
randomFile
.
truncateSync
(
0
);
randomFile
.
closeSync
();
}
}
}
...
...
@@ -419,7 +422,7 @@ class _IOSSimulatorLogReader extends DeviceLogReader {
String
get
name
=>
device
.
name
;
Future
<
int
>
logs
({
bool
clear:
false
})
async
{
Future
<
int
>
logs
({
bool
clear:
false
})
async
{
if
(!
device
.
isConnected
())
return
2
;
...
...
@@ -430,7 +433,7 @@ class _IOSSimulatorLogReader extends DeviceLogReader {
// 'Jan 29 01:31:44 devoncarew-macbookpro3 SpringBoard[96648]: ...'
RegExp
mapRegex
=
new
RegExp
(
r'\S+ +\S+ +\S+ \S+ (.+)\[\d+\]\)?: (.*)$'
);
// Jan 31 19:23:28 --- last message repeated 1 time ---
RegExp
lastMessageRegex
=
new
RegExp
(
r'\S+ +\S+ +\S+
(--- .* ---)
$'
);
RegExp
lastMessageRegex
=
new
RegExp
(
r'\S+ +\S+ +\S+
--- (.*) ---
$'
);
// This filter matches many Flutter lines in the log:
// new RegExp(r'(FlutterRunner|flutter.runner.Runner|$id)'), but it misses
...
...
@@ -450,11 +453,13 @@ class _IOSSimulatorLogReader extends DeviceLogReader {
String
content
=
match
.
group
(
2
);
if
(
category
==
'Game Center'
||
category
==
'itunesstored'
||
category
==
'nanoregistrylaunchd'
)
return
null
;
if
(
category
==
'FlutterRunner'
)
return
content
;
return
'
$category
:
$content
'
;
}
match
=
lastMessageRegex
.
matchAsPrefix
(
string
);
if
(
match
!=
null
)
return
match
.
group
(
1
)
;
return
'(
${match.group(1)}
)'
;
return
string
;
}
);
...
...
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