You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by alsorokin <gi...@git.apache.org> on 2015/05/06 16:33:11 UTC

[GitHub] cordova-medic pull request: CB-8936 Gathering logs for Android

GitHub user alsorokin opened a pull request:

    https://github.com/apache/cordova-medic/pull/53

    CB-8936 Gathering logs for Android

    https://issues.apache.org/jira/browse/CB-8936

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/MSOpenTech/cordova-medic CB-8936

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-medic/pull/53.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #53
    
----
commit 2d7c6091b0da1a75582a8b53c2e6b6ca2f4b6336
Author: alsorokin <al...@akvelon.com>
Date:   2015-05-06T13:18:23Z

    CB-8936 Gathering logs for Android

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-medic pull request: CB-8936 Gathering logs for Android

Posted by dblotsky <gi...@git.apache.org>.
Github user dblotsky commented on a diff in the pull request:

    https://github.com/apache/cordova-medic/pull/53#discussion_r29915107
  
    --- Diff: medic/medic-log.js ---
    @@ -0,0 +1,60 @@
    +#!/usr/bin/env node
    +
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +/* jshint node: true */
    +
    +"use strict";
    +
    +var fs = require("fs");
    +
    +var shelljs  = require("shelljs");
    +var optimist = require("optimist");
    +var util     = require("../lib/util");
    +
    +// main
    +function main() {
    +
    +    // shell config
    +    shelljs.config.fatal  = false;
    +    shelljs.config.silent = false;
    +
    +    // command-specific args
    +    var argv = optimist
    +        .usage("Usage: $0 {platform}")
    +        .argv;
    +
    +    switch (argv.platform) {
    +        case util.ANDROID:
    +            var cmd = "adb logcat -d";
    +            console.log("executing " + cmd);
    +            shelljs.exec(cmd, function(code, output) {
    +                if (code > 0) {
    +                    fatal('Failed to run logcat command.');
    --- End diff --
    
    I was about to merge and did a test, and caught a small bug. It's now `util.fatal`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-medic pull request: CB-8936 Gathering logs for Android

Posted by dblotsky <gi...@git.apache.org>.
Github user dblotsky commented on a diff in the pull request:

    https://github.com/apache/cordova-medic/pull/53#discussion_r29915081
  
    --- Diff: medic/medic-log.js ---
    @@ -0,0 +1,60 @@
    +#!/usr/bin/env node
    +
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +/* jshint node: true */
    +
    +"use strict";
    +
    +var fs = require("fs");
    +
    +var shelljs  = require("shelljs");
    +var optimist = require("optimist");
    +var util     = require("../lib/util");
    +
    +// main
    +function main() {
    +
    +    // shell config
    +    shelljs.config.fatal  = false;
    +    shelljs.config.silent = false;
    +
    +    // command-specific args
    +    var argv = optimist
    +        .usage("Usage: $0 {platform}")
    +        .argv;
    --- End diff --
    
    Please `demand()` the `platform` argument.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-medic pull request: CB-8936 Gathering logs for Android

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/cordova-medic/pull/53


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-medic pull request: CB-8936 Gathering logs for Android

Posted by alsorokin <gi...@git.apache.org>.
Github user alsorokin commented on the pull request:

    https://github.com/apache/cordova-medic/pull/53#issuecomment-100157491
  
    @dblotsky thanks for the review, I've addressed your comments and updated the PR.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org