Suppress libmobilegestalt noise from iOS device logging (#11745)

This patch supports basic filtering of log lines from physical iOS
devices, similar to existing functionality for iOS simulator logging.

This patch also suppresses the following two log messages which are
emitted at app startup on iOS 10.3 devices:
  libMobileGestalt MobileGestaltSupport.m:153: pid 123 (Runner) does not have sandbox access for frZQaeyWLUvLjeuEK43hmg and IS NOT appropriately entitled
  libMobileGestalt MobileGestalt.c:550: no access to InverseDeviceID (see <rdar://problem/11744455>)
This commit is contained in:
Chris Bracken
2017-08-23 10:50:07 -07:00
committed by GitHub
parent 02bdb97b43
commit dc5d2937bb
2 changed files with 48 additions and 2 deletions

View File

@@ -396,11 +396,19 @@ class _IOSDeviceLogReader extends DeviceLogReader {
}
void _onLine(String line) {
// Lines starting with these strings are suppressed from output as noise.
const List<String> blacklist = const <String>[
'libMobileGestalt ',
];
final Match match = _lineRegex.firstMatch(line);
if (match != null) {
// Only display the log line after the initial device and executable information.
_linesController.add(line.substring(match.end));
final String logLine = line.substring(match.end);
if (!blacklist.any(logLine.startsWith)) {
// Only display the log line after the initial device and executable information.
_linesController.add(logLine);
}
}
}