Phonegap overrides console.log badly. How do I turn this off?


i'm working in browser debug app, , phonegap overriding console.log, passing first argument. so, if "console.log("my object: ", myobject), totally leaves off object, makes debugging way harder should because have convert single string argument. don't care debugging on mobile @ point, want work in browser. how stop phonegap overriding console.log? i've tried removing cordova-plugin-console.

 

thanks!

the simplest solution this:

 

console.log(["my object", myobject]); 

 

the output console unlikely pretty, if don't mind adding .join() array, you'd have better output.

 

i'd use convenience method logging app does:

 

app.log = function log() {    if (app.debug) {         var args = [].slice.call(arguments);         console.log(args.join(" ")); // or log location, db or file    } }  app.debug = true; app.log("my object", myobject);  

 

that said, don't recall having problems using regular console.log() multiple parameters... (but again, use convenience method logs somewhere else anyway, local database). if alert(console.log), get?



More discussions in PhoneGap


adobe

Comments

Popular posts from this blog

Illustrator CS6 Ocurrío un error E/S en el archivo.

Why is os_ViewContainer running?

Animate - problem with duplicating scripts after loop