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/08/13 14:20:14 UTC

[GitHub] cordova-medic pull request: CB-8936 Windows logs gathering

GitHub user alsorokin opened a pull request:

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

    CB-8936 Windows logs gathering

    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/59.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 #59
    
----
commit 6f72ede307bb7660e8d6943313b47fe19150093f
Author: alsorokin <al...@akvelon.com>
Date:   2015-08-12T15:24:26Z

    CB-8936 Windows logs gathering

----


---
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 Windows logs gathering

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

    https://github.com/apache/cordova-medic/pull/59#issuecomment-131933828
  
    How will this work - since mobilespec launch does not run with admin permissions? Do you expect enabling the log be a one-time machine setup process?


---
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 Windows logs gathering

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

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


---
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 Windows logs gathering

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

    https://github.com/apache/cordova-medic/pull/59#discussion_r37225154
  
    --- Diff: medic/medic-run.js ---
    @@ -238,6 +241,16 @@ function windowsSpecificPreparation(argv) {
             );
         }
     
    +    // start logging
    +    var logScriptPath = path.join(platformPath, 'cordova', 'log');
    +    if (fs.existsSync(logScriptPath)) {
    +        logProcess = cp.fork(logScriptPath, [], { silent: true });
    +
    +        logProcess.stdout.on('data', function (data) {
    --- End diff --
    
    Should we listen for error and log a message with the error?


---
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 Windows logs gathering

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

    https://github.com/apache/cordova-medic/pull/59#discussion_r37322269
  
    --- Diff: medic/medic-run.js ---
    @@ -238,6 +241,26 @@ function windowsSpecificPreparation(argv) {
             );
         }
     
    +    // start logging
    +    var logScriptPath = path.join(platformPath, 'cordova', 'log');
    +    if (fs.existsSync(logScriptPath)) {
    +        util.medicLog('Running windows log script')
    +        logProcess = cp.fork(logScriptPath, [], { silent: true });
    +
    +        logProcess.stdout.on('data', function (data) {
    +            fs.appendFileSync('./out.log', data, { encoding: util.DEFAULT_ENCODING });
    +        });
    +        logProcess.stderr.on('data', function (data) {
    +            util.medicLog('Logging script STDERR: ' + data);
    +            fs.appendFileSync('./out.log', data, { encoding: util.DEFAULT_ENCODING });
    +
    +            // clear logProcess variable if logging process has exited so we won't try to kill it later
    +            if (data.indexOf('No log channels enabled. Exiting...') !== -1) {
    --- End diff --
    
    Instead of hardcoding this to a particular error message - we should look for the 'close' event on logProcess and set it to null, and log the corresponding error code.


---
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 Windows logs gathering

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

    https://github.com/apache/cordova-medic/pull/59#discussion_r37225188
  
    --- Diff: medic/medic-run.js ---
    @@ -238,6 +241,16 @@ function windowsSpecificPreparation(argv) {
             );
         }
     
    +    // start logging
    +    var logScriptPath = path.join(platformPath, 'cordova', 'log');
    +    if (fs.existsSync(logScriptPath)) {
    +        logProcess = cp.fork(logScriptPath, [], { silent: true });
    --- End diff --
    
    Probably good to create a medic log message 'Starting log..."


---
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 Windows logs gathering

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

    https://github.com/apache/cordova-medic/pull/59#issuecomment-132185137
  
    @nikhilkh I've addressed all of 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


[GitHub] cordova-medic pull request: CB-8936 Windows logs gathering

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

    https://github.com/apache/cordova-medic/pull/59#issuecomment-132108830
  
    Yes, it seems that we have no other options but to enable the logs manually during machine setup.
    I think I need to describe it in the README.md


---
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