You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by dp...@apache.org on 2019/04/17 17:26:20 UTC
[cordova-ios] branch janpio-594_deployment updated: Minor
improvements to logging
This is an automated email from the ASF dual-hosted git repository.
dpogue pushed a commit to branch janpio-594_deployment
in repository https://gitbox.apache.org/repos/asf/cordova-ios.git
The following commit(s) were added to refs/heads/janpio-594_deployment by this push:
new 55216be Minor improvements to logging
55216be is described below
commit 55216be494730a0c45844c97589b75e28910ec2f
Author: Darryl Pogue <da...@ayogo.com>
AuthorDate: Wed Apr 17 10:25:35 2019 -0700
Minor improvements to logging
---
bin/templates/scripts/cordova/lib/build.js | 5 +++--
bin/templates/scripts/cordova/lib/run.js | 6 +++---
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/bin/templates/scripts/cordova/lib/build.js b/bin/templates/scripts/cordova/lib/build.js
index 3ca5936..7a36c06 100644
--- a/bin/templates/scripts/cordova/lib/build.js
+++ b/bin/templates/scripts/cordova/lib/build.js
@@ -160,12 +160,13 @@ module.exports.run = function (buildOpts) {
if (!theTarget) {
return getDefaultSimulatorTarget().then(function (defaultTarget) {
emulatorTarget = defaultTarget.name;
- events.emit('log', 'Building for "' + emulatorTarget + '" Simulator (' + defaultTarget.identifier + ', ' + defaultTarget.simIdentifier + ')');
+ events.emit('warn', `No simulator found for "${newTarget}. Falling back to the default target.`);
+ events.emit('log', `Building for "${emulatorTarget}" Simulator (${defaultTarget.identifier}, ${defaultTarget.simIdentifier}).`);
return emulatorTarget;
});
} else {
emulatorTarget = theTarget.name;
- events.emit('log', 'Building for "' + emulatorTarget + '" Simulator (' + theTarget.identifier + ', ' + theTarget.simIdentifier + ')');
+ events.emit('log', `Building for "${emulatorTarget}" Simulator (${theTarget.identifier}, ${theTarget.simIdentifier}).`);
return emulatorTarget;
}
});
diff --git a/bin/templates/scripts/cordova/lib/run.js b/bin/templates/scripts/cordova/lib/run.js
index 0323e5f..f21fee6 100644
--- a/bin/templates/scripts/cordova/lib/run.js
+++ b/bin/templates/scripts/cordova/lib/run.js
@@ -187,7 +187,7 @@ function deployToSim (appPath, target) {
target = emulator;
}
});
- events.emit('log', 'No target specified for emulator. Deploying to "' + target + '" simulator');
+ events.emit('log', `No target specified for emulator. Deploying to "${target}" simulator.`);
return startSim(appPath, target);
});
} else {
@@ -208,10 +208,10 @@ function iossimLaunch (appPath, devicetypeid, log, exit) {
return superspawn.spawn(f, params, { cwd: projectPath, printCommand: true })
.progress(function (stdio) {
if (stdio.stderr) {
- console.error('ios-sim: ' + stdio.stderr);
+ events.emit('error', `[ios-sim] ${stdio.stderr}`);
}
if (stdio.stdout) {
- events.emit('log', 'ios-sim: ' + stdio.stdout.trim());
+ events.emit('log', `[ios-sim] ${stdio.stdout.trim()}`);
}
})
.then(function (result) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org