Github user nikhilkh commented on a diff in the pull request: https://github.com/apache/cordova-cli/pull/224#discussion_r41881734 --- Diff: src/logger.js --- @@ -45,44 +46,45 @@ function formatError(error, isVerbose) { } else { message = error.message; } + } else { + // Plain text error message + message = error; } - // Some error messages start with 'Error: ' prefix, so cut it off here to avoid duplication. - // This will also remove generic Error.name (type), which Error.stack outputs in verbose mode, - // i.e. events.emit('error', new Error('...')), while preserving a specific Error type like RangeError. - // TODO: Update platforms code to remove such prefixes - message = message && message.replace(/^error:\s+/i, ''); - return message; } logger.log = function (logLevel, message) { if (this.levels[logLevel] >= this.levels[this.logLevel]) { var isVerbose = this.logLevel === 'verbose'; - var prefix = this.prefixes[logLevel] ? this.prefixes[logLevel] + ': ' : ''; + var cursor, output; - if(message instanceof Error) { + if(message instanceof Error || logLevel === 'error') { --- End diff -- If am assuming `CordovaError` is included in the check for instanceof `Error`
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org