[
https://issues.apache.org/jira/browse/CB-1585?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13469590#comment-13469590
]
Patrick Mueller commented on CB-1585:
-------------------------------------
Here's a better view of the patch:
https://github.com/jknight/incubator-cordova-js/compare/47fce02062301efaf3f5b0cc55f68ef1d1a22c06...patch-1
Coupla things:
- the wording in a couple of places references warn()/debug(), but I think this
bug correctly identifies the missing methods as info()/debug(), as we already
have log(), warn() and error(). Correct?
- mucking with the DebugConsole.xxx_LEVEL constants would really require
changing the natives as well, and I don't think there is any functional reason
to do so. This particular module has more function than most of the
consoles out there - eg, setLevel(), which I think we want to drop, because no
one needs it. There's another bug out there regarding using a superset of
Firebug/WebKit/node "console" methods, which is a better, more portable
solution.
So, easiest way to do this is to just add some new origConsole_XXX vars here:
https://github.com/apache/incubator-cordova-js/blob/0e58060f07209c44b084fbde5b305768c05a511f/lib/ios/plugin/ios/console.js#L68
and then create new DebugConsole.prototype.XXX methods here:
https://github.com/apache/incubator-cordova-js/blob/0e58060f07209c44b084fbde5b305768c05a511f/lib/ios/plugin/ios/console.js#L101
and have those implementations call the original versions, then
DebugConsole.prototype.log() .
I can do this, or you can. If you want to, I'd want a pull request at the end,
and to have you get a signed CLA on file - SEE FIRST ITEM ON THIS WIKI PAGE -
http://wiki.apache.org/cordova/ContributorWorkflow .
> console.debug, console.info are undefined
> -----------------------------------------
>
> Key: CB-1585
> URL: https://issues.apache.org/jira/browse/CB-1585
> Project: Apache Cordova
> Issue Type: Bug
> Components: CordovaJS
> Affects Versions: 2.1.0
> Environment: phonegap-phonegap-2.1.0-0-g26d211b.zip
> Reporter: Jeffrey Knight
> Assignee: Filip Maj
> Priority: Critical
> Labels: javascript
>
> cordova-2.1.0.js
> Issue: Web app works as expected in browser. Firebug shows console.debug +
> console.info messages. Drop app into phonegap and it does not work.
>
> Cause: console.debug/info are not defined.
> Fix: add debug+info protypes to console:
> https://github.com/jknight/incubator-cordova-js/blob/patch-1/lib/ios/plugin/ios/console.js
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira