Merge pull request #1806 from jlipps/master

if we can't find ios logs, just log error, don't crash appium
This commit is contained in:
bootstraponline
2014-01-23 10:15:27 -08:00

View File

@@ -61,7 +61,10 @@ IosLog.prototype.startCapture = function(cb) {
var sim7LogsPath = path.resolve(process.env.HOME, "Library", "Logs", "iOS Simulator");
glob(sim7LogsPath + "/7.*/system.log", function(err, files) {
if (err || files.length < 1) {
cb(new Error("Could not start log capture because no iOS 7 simulator logs could be found."));
logger.error("Could not start log capture because no iOS 7 " +
"simulator logs could be found at " + sim7LogsPath + "/7.*. " +
"Logging will not be functional for this run");
return cb();
} else {
var lastModifiedLogPath = files[0]
, lastModifiedLogTime = fs.statSync(files[0]).mtime;