Search code examples
cordovacordova-2.0.0

Suppress PluginResult Output in Phonegap 2.0.0


I am using Phonegap/Cordova 2.0.0 with the Contacts API. When I make a find request, I receive a massive success output to the terminal with all the found contacts, beginning with:

PluginResult:toJSONString - {"status":1,"message":[{"id":

This output ends up being hundreds of lines.

Is there a way to toggle console output for Phonegap APIs?

UPDATE

Per comment below, this will be fixed in the next Phonegap Release.


Solution

  • Shaz checked in code in 2.1 that will default to no logs but you can enable them again by calling setVerbose.

    https://github.com/apache/incubator-cordova-ios/commit/2979d14d70d5f5e67d0c42b81afab76964cdf048#CordovaLib/Classes/CDVPluginResult.m