diff --git a/packages/embark/src/cmd/cmd_controller.js b/packages/embark/src/cmd/cmd_controller.js index a80623b2b..19ddc7d25 100644 --- a/packages/embark/src/cmd/cmd_controller.js +++ b/packages/embark/src/cmd/cmd_controller.js @@ -342,7 +342,8 @@ class EmbarkController { new REPL({ events: engine.events, env: engine.env, - ipc: engine.ipc + ipc: engine.ipc, + logger: engine.logger }).start(callback); } ], function (err, _result) { diff --git a/packages/embark/src/cmd/dashboard/dashboard.js b/packages/embark/src/cmd/dashboard/dashboard.js index cc93de7c8..42bd6e16a 100644 --- a/packages/embark/src/cmd/dashboard/dashboard.js +++ b/packages/embark/src/cmd/dashboard/dashboard.js @@ -25,7 +25,7 @@ class Dashboard { start(done) { let monitor; - monitor = new Monitor({env: this.env, events: this.events, version: this.version, ipc: this.ipc}); + monitor = new Monitor({env: this.env, events: this.events, version: this.version, ipc: this.ipc, logger: this.logger}); this.logger.logFunction = monitor.logEntry; let plugin = this.plugins.createPlugin('dashboard', {}); plugin.registerAPICall( diff --git a/packages/embark/src/cmd/dashboard/monitor.js b/packages/embark/src/cmd/dashboard/monitor.js index 08a88452b..0da9cde9d 100644 --- a/packages/embark/src/cmd/dashboard/monitor.js +++ b/packages/embark/src/cmd/dashboard/monitor.js @@ -11,6 +11,7 @@ class Monitor { this.color = options.color || "green"; this.minimal = options.minimal || false; this.ipc = options.ipc; + this.logger = options.logger; this.screen = blessed.screen({ smartCSR: true, @@ -52,6 +53,7 @@ class Monitor { this.repl = new REPL({ events: this.events, env: this.env, + logger: this.logger, inputStream: this.terminalReadableStream, outputStream: terminalWritableStream, logText: this.logText, diff --git a/packages/embark/src/cmd/dashboard/repl.js b/packages/embark/src/cmd/dashboard/repl.js index 8a03ac35e..7244cea14 100644 --- a/packages/embark/src/cmd/dashboard/repl.js +++ b/packages/embark/src/cmd/dashboard/repl.js @@ -9,6 +9,7 @@ class REPL { this.outputStream = options.outputStream || process.stdout; this.logText = options.logText; this.ipc = options.ipc; + this.logger = options.logger; } addHistory(cmd) { @@ -18,9 +19,9 @@ class REPL { } } - enhancedEval(cmd, context, filename, callback) { - this.events.request('console:executeCmd', cmd.trim(), function (err, message) { - callback(err, message === undefined ? '' : message); // This way, we don't print undefined + enhancedEval(cmd, _context, _filename, _callback) { + this.events.request('console:executeCmd', cmd.trim(), (err, message) => { + this.logger.info(message === undefined ? '' : message); }); }