From 8ea985ff6bb89b867947c132ea6b471f9a8ee41b Mon Sep 17 00:00:00 2001 From: Alex Kocharin Date: Mon, 16 Dec 2013 03:07:19 +0400 Subject: [PATCH] don't color multiline strings in logs output stack traces should be easily recognizable --- lib/logger.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/logger.js b/lib/logger.js index 1b9af080e..0cc4f3547 100644 --- a/lib/logger.js +++ b/lib/logger.js @@ -132,7 +132,7 @@ function print(type, msg, obj, colors) { } if (typeof(str) === 'string') { - if (!colors) { + if (!colors || ~str.indexOf('\n')) { return str } else if (is_error) { return '\033[31m' + str + '\033[39m'