From: Ben Beltran Date: Fri, 9 Jan 2015 16:23:15 +0000 (-0600) Subject: Makes the simple formatter useful X-Git-Tag: v1.1.0~12 X-Git-Url: https://git.r.bdr.sh/rbdr/cologne/commitdiff_plain/59dd6bc4885250f31e0adc382db7c2f2d1da4f57 Makes the simple formatter useful --- diff --git a/lib/formatters/simple.js b/lib/formatters/simple.js index 6d2ad7d..9eb6bbe 100644 --- a/lib/formatters/simple.js +++ b/lib/formatters/simple.js @@ -1,9 +1,11 @@ Module(Cobalt.Formatter, 'Simple')({ format : function (logObject, opts){ - var indent; + var indent, date; indent = Array(logObject._indentLevel + 1).join(' '); - return indent + logObject.message; + date = new Date(logObject._timestamp); + + return indent + '[' + date.toISOString() + '][' + logObject._levelString + '] ' + logObject._from + ' : ' + logObject.message; } });