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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to