You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Chris Brody (JIRA)" <ji...@apache.org> on 2014/09/01 20:32:21 UTC

[jira] [Closed] (CB-623) Logger functionality separated from (debug) console

     [ https://issues.apache.org/jira/browse/CB-623?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Brody closed CB-623.
--------------------------

> Logger functionality separated from (debug) console
> ---------------------------------------------------
>
>                 Key: CB-623
>                 URL: https://issues.apache.org/jira/browse/CB-623
>             Project: Apache Cordova
>          Issue Type: Sub-task
>          Components: CordovaJS, Docs, iOS
>    Affects Versions: 1.6.1
>         Environment: In discussion from CB-611 it is a bad idea to mix logger level functionality with HTML5 console log
>            Reporter: Chris Brody
>            Assignee: Patrick Mueller
>             Fix For: Master
>
>
> After a long discussion with Patrick Mueller in CB-611 it is now clear to me that it is a bad idea to mix extra logger level functionality with {{console}} log functionality. The existing {{console}} object (or {{window.console}} which is equivalent) was already emulating the HTML API for console.log, however some changes that only work in the iOS version are adding extra functions that are not HTML compatible. So if users start writing code that uses extra functions in the {{console}} or {{window.console}} namespace that code will start throwing exceptions if ported or reused in a pure HTML(5) application.
> Patrick Mueller proposed an excellent idea in CB-611 to add a new Javascript object like {{cordova.logger}} to put the functionality related to logging. The primary purpose should be for plugin authors to log things that may be important for debugging applications. So the {{console}} (or {{window.console}}) object can be remain with a fully HTML-compliant API.
> Also, I think there is some agreement that having a built-in plugin called "Debug Console" (with the space in the middle) should be fixed (CB-611/CB-617). Patrick Mueller suggested that we call the plugin something like "Logger" and I really like that idea. It is positioning a lower-level logging facility, that can be called by a higher-level {{console}} API implementation.
> I hereby leave this issue together with CB-611 as well as CB-617 CB-618 CB-619 open for discussion.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)