Return-Path: X-Original-To: apmail-cordova-issues-archive@minotaur.apache.org Delivered-To: apmail-cordova-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9AA7B18891 for ; Fri, 12 Feb 2016 20:28:19 +0000 (UTC) Received: (qmail 988 invoked by uid 500); 12 Feb 2016 20:28:18 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 966 invoked by uid 500); 12 Feb 2016 20:28:18 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 251 invoked by uid 99); 12 Feb 2016 20:28:18 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Feb 2016 20:28:18 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 732B02C1F5B for ; Fri, 12 Feb 2016 20:28:18 +0000 (UTC) Date: Fri, 12 Feb 2016 20:28:18 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-10518) Cordova reports error events with incorrect log level MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-10518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15145236#comment-15145236 ] ASF GitHub Bot commented on CB-10518: ------------------------------------- Github user vladimir-kotikov commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/383#discussion_r52794281 --- Diff: cordova-lib/src/cordova/run.js --- @@ -44,7 +44,7 @@ module.exports = function run(options) { }).then(function() { return hooksRunner.fire('after_run', options); }, function(error) { - events.emit('log', 'ERROR running one or more of the platforms: ' + error + '\nYou may not have the required environment or OS to run this project'); + events.emit('warn', 'ERROR running one or more of the platforms: ' + error + '\nYou may not have the required environment or OS to run this project'); --- End diff -- As in the first comment I'm not sure if we should emit this here because it is not consistent and not very informative. Maybe rethrow with this message. @nikhilkh, what do you think? > Cordova reports error events with incorrect log level > ----------------------------------------------------- > > Key: CB-10518 > URL: https://issues.apache.org/jira/browse/CB-10518 > Project: Apache Cordova > Issue Type: Bug > Components: CordovaLib > Affects Versions: 6.0.0 > Reporter: Vladimir Kotikov > Priority: Minor > Labels: triaged > > In case of fatal errors {{cordova run}} and {{cordova emulate}} methods emit error messages using {{log}} event. This code probably should be changed to use 'warn' level. (We can't use 'error' here due to its special meaning in Node: https://nodejs.org/api/events.html#events_error_events) > There is also other places, where 'log' events is used incorrectly: > cordova-lib\src\cordova\targets.js: events.emit('log', 'An unexpected error has occured'); > cordova-lib\src\plugman\browserify.js: events.emit('log', 'error while generating cordova.js'); > cordova-lib\src\plugman\browserify.js: events.emit('log', 'Error running platform version script'); -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org For additional commands, e-mail: issues-help@cordova.apache.org