incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Mueller (JIRA)" <>
Subject [jira] [Commented] (CB-611) Logging levels
Date Tue, 01 May 2012 22:54:52 GMT


Patrick Mueller commented on CB-611:

bq. Pat:  We create a new logger property on cordova. The primary use for this is plugin code,
not "user land" code. cordova.logger will have whatever minimal logging level stuff we need.

bq. Chris: Why restrict the primary use to plugins?

Because we need to expose this loggingLevel functionality in a new object.  But plugin authors
already have to deal with the {{cordova}} object for other uses.  Might as well put it there.
 We don't really advertise {{cordova}} as being something that user land JavaScript should
be using (I don't think).

And, in general, we should be wary of creating "new API", at least API visible to user land
JavaScript.  Every "API" that we create from here on out will be painful to remove in the

Maybe this new logging facility will pass muster over time and we can declare it API and support
it forever everywhere.  But I've never seen any suggestion that the existing de facto standard
{{console}} object needed this functionality, so history would say YAGNI (in user land JavaScript).
> Logging levels
> --------------
>                 Key: CB-611
>                 URL:
>             Project: Apache Callback
>          Issue Type: Improvement
>          Components: iOS
>    Affects Versions: Master
>         Environment: Run Cordova/PhoneGap with Cordova-SQLitePlugin and some other plugins
>            Reporter: Chris Brody
>            Assignee: Shazron Abdullah
>             Fix For: Master
>   Original Estimate: 48h
>  Remaining Estimate: 48h
> I got a pull request on my Cordova-SQLitePlugin with a special logging function that
is only logging when built as a debug version. I believe this issue should be solved in the
core with a log function that is only logging when built as a debug version. Ideally a logging
facility with multiple log levels. Please forgive me if this has already been done somewhere.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message