cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shazron <>
Subject Re: Logger plugin and console
Date Mon, 06 May 2013 18:49:56 GMT
+1 Sounds reasonable to me

On Mon, May 6, 2013 at 7:42 AM, Ian Clelland <> wrote:

> Prompted by CB-3327, I've been looking again at the implementation of the
> Logger plugin and how it interacts with the native JS console object.
> From what I can see, the current situation is this:
> * We have a Logger plugin, which will *either* log using native code, or
> using the console object, depending on the state of logger.useConsole. It
> will not do both.
> * We also have a console-via-logger plugin, which will log using the
> console object, or using *both* JS console and the Logger plugin, depending
> on console.useLogger.
> * If console.useLogger and logger.useConsole are *both* true, then errors
> are thrown all around.
> * Also, console-via-logger appears to be unused, because it is never mapped
> to console. (No calls to moduleMapper reference that plugin, and there are
> no references to it anywhere in cordova-js/lib). I suspect that it is never
> used at all.
> (There used to be a *third* iOS-only DebugConsole plugin, but I removed
> that about a month ago)
> This is a mess.
> At this point, unless anyone objects, I intend to simplify things greatly
> by allowing the Logger plugin to log to *both* the JS console and native
> code. console-via-logger can then be removed, or made into a no-op, as
> required.
> Ian

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message