title: Cordova 2.9.0 missing exec:Logger.logLevel
body: <p>I am developing a mobile application in WebStorm 6.0.2 and based on Cordova 2.9.0 and JQuery 2.0.3 - all on OSX. The resulting app is being tested in Ripple.</p>
  
  <p>My problem:
  If I send something to the console, for example</p>
  
  <pre><code>console.log('TEST');
  </code></pre>
  
  <p>Then I get an error in the log: missing exec:Logger.logLevel. And worse, this error is displayed with a popup in Ripple ('Logger.logLevel - We seem to be missing some stuff'), which makes debugging very difficult.</p>
  
  <p>If I use exact the same project with an earlier version of Cordova (2.5.0) then this very same error does not appear. So it seems the problem is specific to Cordova and none of the other software used.</p>
  
  <p>I searched with Google for a solution, but strangely enough it seems nobody else has this problem...</p>
  
  <p>EDIT 1:<br>
  1 - The error does not appear if I run the project in the iOS simulator. So the problem is specific to Ripple !<br>
  2 - A Phonegap zip contains specific cordova.js files for every platform. Using the cli to create a new xcode project, by default the iOS version is used. If I use the included OSX version, then the error does not appear in Ripple. But it is (understandably) not possible to use the OSX version of cordova.js for the iOS simulator. That results in errors about missing the cordova bridge.</p>
  
  <p>EDIT 2:<br>
  3 - Cause found: the var UseLogger was false in Cordova 2.6 and is set to true in 2.9.<br>
  4 - Possible solution: edit Cordova.js (but prefer not too !) and set the var UseLogger to false again.</p>
  
  <p>Below the code which results in the error in Ripple (sorry, for the formatting but stackoverflow is making it very difficult to enter html code). Also below the log that shows the error.</p>
  
  <pre><code>&amp;lt;!DOCTYPE html&gt;
  &amp;lt;html&gt;
  &amp;lt;head&gt;
      &amp;lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;
      &amp;lt;meta name="format-detection" content="telephone=no" /&gt;
      &amp;lt;meta name="viewport" content="user-scalable=no, initial-scale=1, 
      maximum-scale=1, minimum-scale=1, width=device-width, height=device-height,
      target-densitydpi=device-dpi" /&gt;
      &amp;lt;script type="text/javascript" src="js/jquery-2.0.3.js"&gt;&amp;lt;/script&gt;
      &amp;lt;script type="text/javascript" src="js/jquery.mobile-1.3.1.js"&gt;&amp;lt;/script&gt;
      &amp;lt;script type="text/javascript" src="js/cordova-2.9.0.js"&gt;&amp;lt;/script&gt;
      &amp;lt;link rel="stylesheet" href="css/jquery.mobile-1.3.1.min.css" /&gt;
      &amp;lt;script type="text/javascript"&gt;
      document.addEventListener("deviceready", onDeviceReady, false);
      function onDeviceReady() {
      }
      &amp;lt;/script&gt;
      &amp;lt;title&gt;&amp;lt;!-- not used in visual app --&gt;&amp;lt;/title&gt;
  &amp;lt;/head&gt;
      &amp;lt;body&gt;
      &amp;lt;div data-role="page" id="pageIndex"&gt;
          &amp;lt;div data-theme="a" data-role="header" data-position="fixed"&gt;
              &amp;lt;h3&gt;
              &amp;lt;/h3&gt;
          &amp;lt;/div&gt;
          &amp;lt;div data-role="content"&gt;
              &amp;lt;a data-role="button" onclick="console.log('TEST');" href="#"&gt;
                  Console test
              &amp;lt;/a&gt;
          &amp;lt;/div&gt;
          &amp;lt;div data-role="footer" class="ui-bar" data-position="fixed"&gt;
              &amp;lt;a data-role="button" href="#" data-icon="info"&gt;Info&amp;lt;/a&gt;
              &amp;lt;a data-role="button" href="#" data-icon="gear"&gt;Options&amp;lt;/a&gt;
          &amp;lt;/div&gt;
      &amp;lt;/div&gt;
      &amp;lt;/body&gt;
  &amp;lt;/html&gt;
  </code></pre>
  
  <blockquote>
  <pre><code>Viewport target-densitydpi is not supported.  index.html:6
  Failed to load resource: the server responded with a status of 404 (Not Found)    http://localhost:63342/Keep/cordova_plugins.json:0
  Failed to load resource: the server responded with a status of 404 (Not Found)    http://localhost:63342/!gap_exec?1373900241256:0
  Ripple :: Environment Warming Up (Tea. Earl Gray. Hot.)   js/cordova-2.9.0.js:5638
  cordova :: Initialization Finished (Make it so.)  js/cordova-2.9.0.js:5638
  Failed to load resource: the server responded with a status of 404 (Not Found)    http://localhost:63342/Keep/icon.png:0
  Viewport target-densitydpi is not supported.  index.html:6
  Failed to load resource: the server responded with a status of 404 (Not Found)    http://localhost:63342/Keep/cordova_plugins.json:0
  Access made to deprecated symbol: navigator.network.connection. null  js/cordova-2.9.0.js:5638
  
  // if the button is clicked, the log below is the result
  
  missing exec:Logger.logLevel  js/cordova-2.9.0.js:5638
  LOG,TEST  js/cordova-2.9.0.js:5638
  TypeError: Cannot call method 'logLevel' of undefined js/cordova-2.9.0.js:5638
  TypeError: Cannot call method 'logLevel' of undefined
      at module.exports.exec
      at Object.logger.logLevel (http://localhost:63342/Keep/js/cordova-2.9.0.js:5626:9)
      at logWithArgs (http://localhost:63342/Keep/js/cordova-2.9.0.js:5598:21)
      at Object.logger.log (http://localhost:63342/Keep/js/cordova-2.9.0.js:5561:36)
      at HTMLAnchorElement.onclick (http://localhost:63342/Keep/index.html:29:164)  js/cordova-2.9.0.js:5638
  Logger    js/cordova-2.9.0.js:5638
  logLevel  js/cordova-2.9.0.js:5638
  TEST  js/cordova-2.9.0.js:5638
  deviceready has not fired after 5 seconds.    js/cordova-2.9.0.js:5638
  Channel not fired: onCordovaConnectionReady   js/cordova-2.9.0.js:5638
  Channel not fired: onCordovaInfoReady js/cordova-2.9.0.js:5638
  </code></pre>
  </blockquote>