Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9364510CA5 for ; Fri, 12 Jul 2013 19:19:51 +0000 (UTC) Received: (qmail 27103 invoked by uid 500); 12 Jul 2013 19:19:51 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 27079 invoked by uid 500); 12 Jul 2013 19:19:51 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 27071 invoked by uid 99); 12 Jul 2013 19:19:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Jul 2013 19:19:51 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of shazron@gmail.com designates 209.85.216.170 as permitted sender) Received: from [209.85.216.170] (HELO mail-qc0-f170.google.com) (209.85.216.170) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Jul 2013 19:19:47 +0000 Received: by mail-qc0-f170.google.com with SMTP id s1so5219983qcw.15 for ; Fri, 12 Jul 2013 12:19:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=7qQ/cSDHG8N4XxSgO0yuam2E0pid14xrwW/tTd7WRGo=; b=UYpMDvvAlxAXVdmU1c0wWu2ldfe8hgbpWD59kaSrfLdBywaFqcVYI/dijCzrGB3APF CzCdBDjRlposzhKqtRF4rcmK2N+YIUvXKKnFaZtkZbae/VQwcgm61yoIZP7uuEXEQ+pD NydjKxzpS1PREcZ17qGjmFqOTCZzL2BMDbasRYs0BroQi22kd1z9jnHjKsXuONG0AnFZ onNm4ywPHxGg2e82rsmzfVdkb7wfdNuSCgvtrtzDCjp1l+bLSOCegf0imcbs2dUXP01Z vQcuChWHmzeRBej75R6W9z627bhhjjhHXJtkmrhz+CCY8Ii1AacyOng9JgrEEtcS/Opl wzFw== X-Received: by 10.49.98.138 with SMTP id ei10mr36426479qeb.3.1373656766456; Fri, 12 Jul 2013 12:19:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.49.12.145 with HTTP; Fri, 12 Jul 2013 12:18:46 -0700 (PDT) In-Reply-To: References: <1372833615021.0ff3e02a@Nodemailer> From: Shazron Date: Fri, 12 Jul 2013 12:18:46 -0700 Message-ID: Subject: Re: CDVLogger went away in master To: "dev@cordova.apache.org" Content-Type: multipart/alternative; boundary=047d7bdc832c9bb0f704e15563a9 X-Virus-Checked: Checked by ClamAV on apache.org --047d7bdc832c9bb0f704e15563a9 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Hmm, looking at the code there is UseLogger (native logger - our plugin) and UseConsole (the built in one, eg Safari RWI) booleans, and the code doesn't allow both to be used, but somehow my results _shouldn't_ happen (log to both)-- thus useConsole(false) should be correct for what we want (native logging using our plugin), thus what I've seen is a bug in the behaviour vs how it is designed. So the way the plugin was designed is _not_ to allow use of both, but do we want to use both? (change the design) I think we do.. On Fri, Jul 12, 2013 at 11:59 AM, Shazron wrote: > I can't think of an instance where someone would set it to "true" -- I > suppose if they _don't_ want to log to the Xcode console? > > > On Fri, Jul 12, 2013 at 11:58 AM, Shazron wrote: > >> I'm also thinking about users - when they install the console plugin (or >> we bundle it, whatever), all their console logs are not showing up... >> The name of the API call useConsole here is not very clear about its >> intent (confusing). >> >> Andrew, the default right now is "true". I guess we can change that to >> false, and delete the startup.js file? >> >> >> On Fri, Jul 12, 2013 at 11:50 AM, Andrew Grieve wr= ote: >> >>> Cool. I think that's the ideal (printing to actual console + echoing to >>> Xcode). Is useConsole(false) the default? If so, we can just delete the >>> startup.js file? >>> >>> >>> On Fri, Jul 12, 2013 at 2:44 PM, Shazron wrote: >>> >>> > Ok - right now for CDVLogger in iOS (I assume its true for the other >>> > platforms, haven't tested it), the default is not to clobber the >>> console >>> > object if it exists, which enables you to see the log in the Safari >>> Remote >>> > Web Inspector for example. However, the default currently does not >>> make the >>> > console log show in the Xcode console. >>> > >>> > The default setting is this: >>> > >>> > logger-startup.js: >>> > logger.useConsole(true); >>> > >>> > I think it should be for a default: >>> > >>> > logger-startup.js: >>> > logger.useConsole(false); >>> > >>> > By setting it to false as a default, you can now both see the console >>> log >>> > in the Safari Remote Web Inspector and the Xcode console. >>> > >>> > >>> > >>> > On Thu, Jul 11, 2013 at 1:58 PM, Shazron wrote: >>> > >>> > > Fixed https://issues.apache.org/jira/browse/CB-4157 >>> > > >>> > > >>> > > On Thu, Jul 11, 2013 at 1:46 PM, Shazron wrote: >>> > > >>> > >> Ah - logger-startup.js has: >>> > >> >>> > >> var logger =3D require("cordova/plugin/logger"); >>> > >> >>> > >> (undefined) >>> > >> >>> > >> >>> > >> On Thu, Jul 11, 2013 at 1:42 PM, Shazron wrote= : >>> > >> >>> > >>> Not sure what's going on - but if I create a new ios project with >>> > >>> cordova-ios/master (I just updated the js in the repo) and instal= l >>> > >>> cordova-plugin-console using plugman, deviceready does not fire >>> now. >>> > >>> >>> > >>> >>> > >>> On Thu, Jul 11, 2013 at 7:06 AM, Michal Mocny >> > >wrote: >>> > >>> >>> > >>>> Hmm. Thats interested. >>> > >>>> >>> > >>>> On the one hand, I'de say we could just break those rare plugins >>> into >>> > >>>> pieces, core.console-common, core.console, core.console-ios. Su= ch >>> > that >>> > >>>> each depend on common, but console installs without ios by >>> default. >>> > >>>> >>> > >>>> On the other hand, I do think its interesting to support >>> disabling a >>> > >>>> plugin >>> > >>>> for a given platform, in case it is buggy/unneeded/whatever. >>> Feature >>> > >>>> for >>> > >>>> the future. >>> > >>>> >>> > >>>> -Michal >>> > >>>> >>> > >>>> >>> > >>>> On Thu, Jul 11, 2013 at 8:27 AM, Andrew Grieve < >>> agrieve@chromium.org> >>> > >>>> wrote: >>> > >>>> >>> > >>>> > Out of core. >>> > >>>> > >>> > >>>> > On a related note - Console for iOS brings up an interesting >>> > >>>> use-case. iOS >>> > >>>> > now has a working Console for 6+, so it's reasonable for peopl= e >>> to >>> > >>>> want a >>> > >>>> > console only for other platforms. >>> > >>>> > >>> > >>>> > cordova plugin add org.apache.cordova.core.console >>> > --skip-platform=3Dios >>> > >>>> > >>> > >>>> > Feature for the future? >>> > >>>> > >>> > >>>> > >>> > >>>> > On Wed, Jul 10, 2013 at 8:36 PM, Shazron >>> wrote: >>> > >>>> > >>> > >>>> > > So what's the decision here? Out of core right? (Since it >>> hasn't >>> > >>>> been put >>> > >>>> > > back in, for iOS) So I can remove CDVLogger from config.xml >>> in the >>> > >>>> > > template... >>> > >>>> > > >>> > >>>> > > >>> > >>>> > > On Tue, Jul 2, 2013 at 11:40 PM, David Pfahler < >>> > >>>> david@excellenteasy.com >>> > >>>> > > >wrote: >>> > >>>> > > >>> > >>>> > > > I'd remove it from the core but have the resulting plugin >>> > >>>> installed by >>> > >>>> > > > default. This way you have best of both worlds, the >>> pragmatist's >>> > >>>> > default >>> > >>>> > > > and the purist's minimalism. >>> > >>>> > > > =97 >>> > >>>> > > > Sent from mobile >>> > >>>> > > > >>> > >>>> > > > On Tue, Jul 2, 2013 at 11:54 PM, Steven Gill < >>> > >>>> stevengill97@gmail.com> >>> > >>>> > > > wrote: >>> > >>>> > > > >>> > >>>> > > > > +1 to making it a platform dependency and keeping it as = a >>> > >>>> plugin. >>> > >>>> > > > > On Tue, Jul 2, 2013 at 2:37 PM, Brian LeRoux >>> > >>>> wrote: >>> > >>>> > > > >> I love that idea. Makes transitioning easy. >>> > >>>> > > > >> On Jul 2, 2013 1:38 PM, "Michal Mocny" < >>> mmocny@chromium.org> >>> > >>>> wrote: >>> > >>>> > > > >> >>> > >>>> > > > >> > perhaps platforms should support plugin dependencies? >>> > >>>> > > > >> > >>> > >>>> > > > >> > >>> > >>>> > > > >> > On Tue, Jul 2, 2013 at 3:57 PM, Andrew Grieve < >>> > >>>> > agrieve@chromium.org >>> > >>>> > > > >>> > >>>> > > > >> > wrote: >>> > >>>> > > > >> > >>> > >>>> > > > >> > > Tyler - remote web inspector works for iOS 6 on >>> device, >>> > >>>> not just >>> > >>>> > > in >>> > >>>> > > > the >>> > >>>> > > > >> > > simulator. >>> > >>>> > > > >> > > >>> > >>>> > > > >> > > I removed the logger since it got moved to the >>> > >>>> > > > cordova-plugin-console >>> > >>>> > > > >> > repo. >>> > >>>> > > > >> > > To be clear, is the proposal here to delete that >>> repo? >>> > >>>> > > > >> > > >>> > >>>> > > > >> > > I'd like to see it remain *not* in core only becaus= e >>> it >>> > >>>> can be >>> > >>>> > > > written >>> > >>>> > > > >> > as a >>> > >>>> > > > >> > > plugin. Let's just have it installed by default by >>> CLI? >>> > >>>> > > > >> > > >>> > >>>> > > > >> > > >>> > >>>> > > > >> > > On Tue, Jul 2, 2013 at 3:38 PM, Tyler Wilson < >>> > >>>> > > > >> twilson@pulse-robotics.com >>> > >>>> > > > >> > > >wrote: >>> > >>>> > > > >> > > >>> > >>>> > > > >> > > > Another view: what percentage of developers use t= he >>> > >>>> > console.log >>> > >>>> > > > API >>> > >>>> > > > >> > > during >>> > >>>> > > > >> > > > development? I would think that the vast majority >>> do. >>> > So >>> > >>>> why >>> > >>>> > > add a >>> > >>>> > > > >> step >>> > >>>> > > > >> > > for >>> > >>>> > > > >> > > > a feature that most developers use or need? My >>> Cordova >>> > >>>> work >>> > >>>> > has >>> > >>>> > > > been >>> > >>>> > > > >> > > mostly >>> > >>>> > > > >> > > > done on-device, since I am using a custom plug-in >>> that >>> > >>>> > requires >>> > >>>> > > > the >>> > >>>> > > > >> > > > hardware. So until there is a way to debug the JS >>> > >>>> on-device, I >>> > >>>> > > am >>> > >>>> > > > >> > highly >>> > >>>> > > > >> > > > dependent on the console.log functionality. >>> > >>>> > > > >> > > > >>> > >>>> > > > >> > > > So basically +1 keep in core for me. >>> > >>>> > > > >> > > > >>> > >>>> > > > >> > > > Thank you, >>> > >>>> > > > >> > > > Tyler >>> > >>>> > > > >> > > > >>> > >>>> > > > >> > > > On Jul 2, 2013, at 3:22 PM, Brian LeRoux < >>> b@brian.io> >>> > >>>> wrote: >>> > >>>> > > > >> > > > >>> > >>>> > > > >> > > > > Its a good point about ios6+. I can't imagine >>> anyone >>> > is >>> > >>>> > > > developing >>> > >>>> > > > >> > for >>> > >>>> > > > >> > > > > anything less (other than corodva@<=3D2.9 legac= y >>> > >>>> support). >>> > >>>> > > > >> > > > > >>> > >>>> > > > >> > > > > >>> > >>>> > > > >> > > > > On Tue, Jul 2, 2013 at 11:44 AM, Michal Mocny < >>> > >>>> > > > mmocny@chromium.org >>> > >>>> > > > >> > >>> > >>>> > > > >> > > > wrote: >>> > >>>> > > > >> > > > >> To answer the question of why we may want to >>> leave >>> > it >>> > >>>> out: >>> > >>>> > > > >> > > > >> >>> > >>>> > > > >> > > > >> - If you are using remote debugging on ios6+ y= ou >>> > >>>> don't need >>> > >>>> > > it >>> > >>>> > > > >> > > > >> - Our log wrapper has been repeatedly less >>> > functional >>> > >>>> than >>> > >>>> > > the >>> > >>>> > > > >> > system >>> > >>>> > > > >> > > > >> implementation (though we do fix these issues = as >>> > they >>> > >>>> are >>> > >>>> > > > found) >>> > >>>> > > > >> > > > >> >>> > >>>> > > > >> > > > >> But that does not mean I am arguing against >>> leaving >>> > >>>> it in >>> > >>>> > by >>> > >>>> > > > >> > default. >>> > >>>> > > > >> > > > >> Idealist me says 3.0.0 should move everything >>> that >>> > >>>> can be a >>> > >>>> > > > plugin >>> > >>>> > > > >> > out >>> > >>>> > > > >> > > > to >>> > >>>> > > > >> > > > >> a plugin. Pragmatist me says this is pretty >>> > >>>> safe/useful in >>> > >>>> > > > core. >>> > >>>> > > > >> > +0 >>> > >>>> > > > >> > > > vote >>> > >>>> > > > >> > > > >> here either way. >>> > >>>> > > > >> > > > >> >>> > >>>> > > > >> > > > >> Perhaps we could have a set of "default" plugi= ns >>> > that >>> > >>>> are >>> > >>>> > > > >> installed, >>> > >>>> > > > >> > > but >>> > >>>> > > > >> > > > >> can be un-installed? This would give us best = of >>> > both >>> > >>>> > worlds. >>> > >>>> > > > >> > > > >> >>> > >>>> > > > >> > > > >> -Michal >>> > >>>> > > > >> > > > >> >>> > >>>> > > > >> > > > >> >>> > >>>> > > > >> > > > >> On Tue, Jul 2, 2013 at 1:01 PM, Filip Maj < >>> > >>>> fil@adobe.com> >>> > >>>> > > > wrote: >>> > >>>> > > > >> > > > >> >>> > >>>> > > > >> > > > >>> The only one I can think of is a production >>> > >>>> environment to >>> > >>>> > > > try to >>> > >>>> > > > >> > > save >>> > >>>> > > > >> > > > on >>> > >>>> > > > >> > > > >>> a few kb of footprint and a few initializatio= n >>> > >>>> cycles. I >>> > >>>> > > don't >>> > >>>> > > > >> > think >>> > >>>> > > > >> > > > it's >>> > >>>> > > > >> > > > >>> worth removing entirely from core, though. >>> Instead, >>> > >>>> try to >>> > >>>> > > > make >>> > >>>> > > > >> the >>> > >>>> > > > >> > > > >>> built-in Logger plugin as easily removable as >>> > >>>> possible. >>> > >>>> > > > >> > > > >>> >>> > >>>> > > > >> > > > >>> On 7/2/13 9:57 AM, "Marcel Kinard" < >>> > >>>> cmarcelk@gmail.com> >>> > >>>> > > > wrote: >>> > >>>> > > > >> > > > >>> >>> > >>>> > > > >> > > > >>>> Are there a scenarios where it would be good >>> to >>> > not >>> > >>>> have >>> > >>>> > > > Logger >>> > >>>> > > > >> in >>> > >>>> > > > >> > > an >>> > >>>> > > > >> > > > >>>> app, such as permissions, footprint, or just >>> not >>> > >>>> needing >>> > >>>> > > any >>> > >>>> > > > >> > logging >>> > >>>> > > > >> > > > >>>> functionality? I'm having a tough time >>> thinking of >>> > >>>> any, >>> > >>>> > so >>> > >>>> > > > I'd >>> > >>>> > > > >> > also >>> > >>>> > > > >> > > > say: >>> > >>>> > > > >> > > > >>>> +1 leaving Logger in core >>> > >>>> > > > >> > > > >>>> >>> > >>>> > > > >> > > > >>> >>> > >>>> > > > >> > > > >>> >>> > >>>> > > > >> > > > >>> > >>>> > > > >> > > > >>> > >>>> > > > >> > > >>> > >>>> > > > >> > >>> > >>>> > > > >> >>> > >>>> > > > >>> > >>>> > > >>> > >>>> > >>> > >>>> >>> > >>> >>> > >>> >>> > >> >>> > > >>> > >>> >> >> > --047d7bdc832c9bb0f704e15563a9--