From 346c8e0784db3367bc1aeef29665efaa72b52a51 Mon Sep 17 00:00:00 2001 From: cubedro Date: Wed, 3 Jun 2015 05:19:00 +0300 Subject: [PATCH 1/2] fixed log error --- lib/utils/logger.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/utils/logger.js b/lib/utils/logger.js index 7ccd1b0..3faea33 100644 --- a/lib/utils/logger.js +++ b/lib/utils/logger.js @@ -103,7 +103,7 @@ var typeColors = { console[item.name] = function () { var args = Array.prototype.slice.call(arguments); - var type, + var type = null, sign, time; var section = 'API'; @@ -124,7 +124,10 @@ var typeColors = { type = args.splice(0, 1); } - sign = item.signColor.bold( '[' ) + chalk.reset.bold.white( section ) + item.signColor.bold( ']' ) + " " + item.signColor.bold( '[' ) + typeColors[type](type) + item.signColor.bold( ']' ); + sign = item.signColor.bold( '[' ) + chalk.reset.bold.white( section ) + item.signColor.bold( ']' ); + + if(type !== null) + sign = + " " + item.signColor.bold( '[' ) + typeColors[type](type) + item.signColor.bold( ']' ); if(item.name !== "time" && item.name !== "timeEnd") { From b2ad83ba612e1aaa84639f7db3edb24cedc1d555 Mon Sep 17 00:00:00 2001 From: cubedro Date: Wed, 3 Jun 2015 05:22:53 +0300 Subject: [PATCH 2/2] fixed typo --- lib/utils/logger.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/utils/logger.js b/lib/utils/logger.js index 3faea33..7485294 100644 --- a/lib/utils/logger.js +++ b/lib/utils/logger.js @@ -12,7 +12,7 @@ var sections = [ var types = [ 'CON', 'CHR', - 'UDP', + 'UPD', 'BLK', 'TXS', 'STA', @@ -23,7 +23,7 @@ var types = [ var typeColors = { 'CON': chalk.reset.bold.yellow, 'CHR': chalk.reset.bold.red, - 'UDP': chalk.reset.bold.green, + 'UPD': chalk.reset.bold.green, 'BLK': chalk.reset.bold.blue, 'TXS': chalk.reset.bold.cyan, 'STA': chalk.reset.bold.red,