removed rogue console.log that was making lib tests look fugly, changed CordovaLogger calls to events.emit to match most code. Is CordovaLogger used anywhere?
diff --git a/src/ConfigChanges/ConfigChanges.js b/src/ConfigChanges/ConfigChanges.js
index e0af8a9..1780d25 100644
--- a/src/ConfigChanges/ConfigChanges.js
+++ b/src/ConfigChanges/ConfigChanges.js
@@ -32,7 +32,7 @@
var path = require('path');
var et = require('elementtree');
var ConfigKeeper = require('./ConfigKeeper');
-var CordovaLogger = require('../CordovaLogger');
+var events = require('../events');
var mungeutil = require('./munge-util');
var xml_helpers = require('../util/xml-helpers');
@@ -134,7 +134,7 @@
' cannot be added. <edit-config> changes in this plugin conflicts with <edit-config> changes in config.xml. Conflicts must be resolved before plugin can be added.');
}
if (plugin_force) {
- CordovaLogger.get().log(CordovaLogger.WARN, '--force is used. edit-config will overwrite conflicts if any. Conflicting plugins may not work as expected.');
+ events.emit('warn', '--force is used. edit-config will overwrite conflicts if any. Conflicting plugins may not work as expected.');
// remove conflicting munges
var conflict_munge = mungeutil.decrement_munge(platform_config.config_munge, isConflictingInfo.conflictingMunge);
@@ -198,7 +198,7 @@
}
}
if (Object.keys(isConflictingInfo.conflictingMunge.files).length !== 0) {
- CordovaLogger.get().log(CordovaLogger.WARN, 'Conflict found, edit-config changes from config.xml will overwrite plugin.xml changes');
+ events.emit('warn', 'Conflict found, edit-config changes from config.xml will overwrite plugin.xml changes');
// remove conflicting plugin.xml munges
conflict_munge = mungeutil.decrement_munge(platform_config.config_munge, isConflictingInfo.conflictingMunge);
diff --git a/src/ConfigParser/ConfigParser.js b/src/ConfigParser/ConfigParser.js
index 9c3943e..095ccf2 100644
--- a/src/ConfigParser/ConfigParser.js
+++ b/src/ConfigParser/ConfigParser.js
@@ -31,7 +31,7 @@
this.cdvNamespacePrefix = getCordovaNamespacePrefix(this.doc);
et.register_namespace(this.cdvNamespacePrefix, 'http://cordova.apache.org/ns/1.0');
} catch (e) {
- console.error('Parsing ' + path + ' failed');
+ events.emit('error', 'Parsing ' + path + ' failed');
throw e;
}
var r = this.doc.getroot();