diff --git a/lib/util/logger.js b/lib/util/logger.js index c36f2493..624fe4ef 100644 --- a/lib/util/logger.js +++ b/lib/util/logger.js @@ -1,8 +1,7 @@ var util = require('util') var events = require('events') -// Enable "string".color -require('colors') +var chalk = require('chalk') var Logger = new events.EventEmitter() @@ -45,7 +44,7 @@ function Log(tag) { , 5: 'ERR' , 6: 'FTL' } - this.colors = { + this.styles = { 1: 'grey' , 2: 'cyan' , 3: 'green' @@ -118,7 +117,7 @@ Log.prototype._format = function(entry) { } Log.prototype._name = function(priority) { - return this.names[priority][this.colors[priority]] + return chalk[this.styles[priority]](this.names[priority]) } Log.prototype._write = function(entry) {