[ 
https://issues.apache.org/jira/browse/CB-611?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13266215#comment-13266215
 ] 

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 future.  

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: https://issues.apache.org/jira/browse/CB-611
>             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: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to