Merge pull request #179 from cubedro/develop

fixed log error
This commit is contained in:
Marian OANCΞA 2015-06-03 05:23:07 +03:00
commit adce71229a

View File

@ -12,7 +12,7 @@ var sections = [
var types = [ var types = [
'CON', 'CON',
'CHR', 'CHR',
'UDP', 'UPD',
'BLK', 'BLK',
'TXS', 'TXS',
'STA', 'STA',
@ -23,7 +23,7 @@ var types = [
var typeColors = { var typeColors = {
'CON': chalk.reset.bold.yellow, 'CON': chalk.reset.bold.yellow,
'CHR': chalk.reset.bold.red, 'CHR': chalk.reset.bold.red,
'UDP': chalk.reset.bold.green, 'UPD': chalk.reset.bold.green,
'BLK': chalk.reset.bold.blue, 'BLK': chalk.reset.bold.blue,
'TXS': chalk.reset.bold.cyan, 'TXS': chalk.reset.bold.cyan,
'STA': chalk.reset.bold.red, 'STA': chalk.reset.bold.red,
@ -103,7 +103,7 @@ var typeColors = {
console[item.name] = function () console[item.name] = function ()
{ {
var args = Array.prototype.slice.call(arguments); var args = Array.prototype.slice.call(arguments);
var type, var type = null,
sign, sign,
time; time;
var section = 'API'; var section = 'API';
@ -124,7 +124,10 @@ var typeColors = {
type = args.splice(0, 1); 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") if(item.name !== "time" && item.name !== "timeEnd")
{ {