[
https://issues.apache.org/jira/browse/CB-1234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13434365#comment-13434365
]
Matt Johnson commented on CB-1234:
----------------------------------
Patrick's comments from the pull request:
I like the pass-thru logic; been meaning to do that for a while.
And I like having the messages queued if the connection is not open yet, or
closed, or whatever.
Not thrilled with the change to @useRemote though. That method is intended to
be used to switch the global window.console object from the weinre one to the
original one, and back, but no longer does that in your version.
To complicate things a little, folks have asked for fine-grained control of the
console, in terms of:
only display messages at the weinre console
only display messages at the original console
display messages in both places.
I think the default should be "both".
So, you could see this as three static methods on the Console class:
useRemote() - same as before, where it switches the window.console object
between the weinre one and the original one. I still want that function there.
sendToWeinre() - another getter/setter function (setter returns original value)
to indicate whether to send messages to weinre console
sendToNative() - another getter/setter function (setter returns original value)
to indicate whether to send messages to original console
Actually, after having typed all that up, just realized it should be in a bug
in JIRA. Please file an issue there so we can discuss further:
> Console should queue log messages if not connected
> --------------------------------------------------
>
> Key: CB-1234
> URL: https://issues.apache.org/jira/browse/CB-1234
> Project: Apache Cordova
> Issue Type: New Feature
> Components: weinre
> Affects Versions: 2.0.0
> Reporter: Matt Johnson
> Assignee: Patrick Mueller
>
> Console log messages (log, debug, error, info, warn) from the target may be
> lost if they are executed on the device before the remote connection is fully
> complete. These should be queued up if there is no remote connection (and
> dequeued when one is acquired) so all log messages are retained.
> I have a pull request at
> https://github.com/apache/incubator-cordova-weinre/pull/8 that does this as
> well as turns the Console into a passthru so that all calls to Console still
> act on the OriginalConsole as well as the RemoteConsole so that the target
> behavior with weinre is unchanged.
--
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