From 3b84a63fc2e6af04bebebc93e7a7592be09be16e Mon Sep 17 00:00:00 2001 From: Justin SB Date: Fri, 19 Sep 2014 18:04:06 -0700 Subject: [PATCH] Choose stdout/stderr, even if we're not in pretty mode --- tools/console.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/tools/console.js b/tools/console.js index 648de8fe86..21dab21e17 100644 --- a/tools/console.js +++ b/tools/console.js @@ -194,16 +194,24 @@ _.extend(Console.prototype, { } var dest = process.stdout; - var style = null; - - if (level && self._pretty) { + if (level) { switch (level.code) { case LEVEL_CODE_ERROR: dest = process.stderr; - style = chalk.bold.red; break; case LEVEL_CODE_WARN: dest = process.stderr; + break; + } + } + + var style = null; + if (level && self._pretty) { + switch (level.code) { + case LEVEL_CODE_ERROR: + style = chalk.bold.red; + break; + case LEVEL_CODE_WARN: style = chalk.red; break; //case LEVEL_CODE_INFO: