mirror of
https://github.com/appium/appium.git
synced 2026-04-29 06:50:56 -05:00
Parsing date from device log lines using regex to handle splitting on 1 or more spaces because date strings for days 1->9 look like "June 9 14:30:43" and splitting on single space was incorrect.
This commit is contained in:
@@ -152,7 +152,7 @@ IosLog.prototype.onOutput = function (data, prefix) {
|
||||
// logRowDate.isAfter(this.iosLogStartTime) check so we require a state flag here,
|
||||
// otherwise all the lines without dates get filtered out even if they are new.
|
||||
if (!this.loggingModeOn) {
|
||||
var logRowParts = log.split(" ");
|
||||
var logRowParts = log.split(/\s+/);
|
||||
var logRowDate = new Date(
|
||||
Date.parse(this.iosLogStartTime.getFullYear() + " " + logRowParts[0] + " " + logRowParts[1] + " " + logRowParts[2])
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user