From 0146df6698677b2ff558dd8fcf36ede7aa3e74f5 Mon Sep 17 00:00:00 2001 From: Kiko Beats Date: Tue, 26 Apr 2016 22:53:49 +0200 Subject: [PATCH] WIP --- lib/Default.coffee | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/Default.coffee b/lib/Default.coffee index e4e9b68..33f6e34 100644 --- a/lib/Default.coffee +++ b/lib/Default.coffee @@ -58,7 +58,10 @@ module.exports = diff = now - @timestamp ++@counter if (diff > 1000) @timestamp = new Date() - " [#{@decorateCounter(@counter)}]" + "[#{@decorateCounter(@counter)}]" + + outputContext: -> + @context transport: console.log @@ -85,7 +88,10 @@ module.exports = messageCounter = @outputCounter() messageCounter = @colorize CONST.LINE_COLOR, messageCounter - output = messageType + messageCounter + @align + message + messageContext = @outputContext() + messageContext = @colorize CONST.LINE_COLOR, messageContext + + output = "#{messageType} #{messageCounter} #{messageContext} #{@align}#{message}" output += @colorize colorType, diff if diff output @@ -131,10 +137,11 @@ module.exports = keyword: null diff: false - align: "\t\t\t" + align: "\t\t" color: true counter: 0 cli: false + context: 'test' timestamp: new Date()