From: Ben Beltran Date: Fri, 9 Jan 2015 16:23:15 +0000 (-0600) Subject: Makes the simple formatter useful X-Git-Url: https://git.r.bdr.sh/rbdr/cologne/commitdiff_plain/33781b33c2fbcea1b1496fa860afe3eb66c9cf98?ds=sidebyside 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; } });