From 8a4855c4119edda5aa98091c699b5d7ddf33b639 Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Fri, 8 Jan 2016 11:16:11 -0800 Subject: [PATCH] Add getLogs to Process --- console/src/modules/hf-process.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/console/src/modules/hf-process.js b/console/src/modules/hf-process.js index 60a24bb804..817f25d341 100755 --- a/console/src/modules/hf-process.js +++ b/console/src/modules/hf-process.js @@ -245,13 +245,19 @@ Process.prototype = extend(Process.prototype, { } return false; }, + getLogs: function() { + var logs = {}; + logs[this.child.pid] = { + stdout: this.logStdout == 'ignore' ? null : this.logStdout, + stderr: this.logStderr == 'ignore' ? null : this.logStderr + }; + return logs; }, // Events onChildStartError: function(error) { console.log("Child process error ", error); - this.state = ProcessStates.STOPPED; - this.emit('state-update', this); + this.updateState(ProcessStates.STOPPED); }, onChildClose: function(code) { console.log("Child process closed with code ", code, this.name);