Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Phonegap/Cordova too many logs CordovaLog Web Console

I am using the latest phonegap/cordova version 2.1. and I am getting too many logs in eclipse logcat: everything is logged twice using f.e.

console.log("test")

CordovaLog   test
Web Console  test

This could be disabled by a filter in eclipse, but there must be smarter solution.

like image 800
Sebastian Viereck Avatar asked Oct 29 '12 10:10

Sebastian Viereck


2 Answers

You should edit the following entry

<log level="DEBUG"/>

in the config.xml file.

Available values are ERROR, WARN, INFO, DEBUG, VERBOSE (default=ERROR)

Setting to ERROR you will see the least amount of log messages.

like image 165
Ranhiru Jude Cooray Avatar answered Nov 08 '22 11:11

Ranhiru Jude Cooray


Take a look at this

http://css.dzone.com/articles/setting-console-debugging

UPDATE :

After a lot of hard work, I found out that is the BEST and the ONLY solution available right now to debug your javascript code with phonegap is to open the HTML file in the browser and use its console to debug it IE (Google Chrome) , Also, JSFiddle's JSLint feature will help you find almost all the bugs in your code

Best Regards

like image 32
SAFAD Avatar answered Nov 08 '22 12:11

SAFAD