aboutsummaryrefslogtreecommitdiff
path: root/lib/formatters/simple.js
diff options
context:
space:
mode:
authorBen Beltran <ben@nsovocal.com>2015-01-09 10:23:15 -0600
committerBen Beltran <ben@nsovocal.com>2015-01-09 10:23:15 -0600
commit33781b33c2fbcea1b1496fa860afe3eb66c9cf98 (patch)
treedca43aa7b772bc5894c8a9c5e8f44695e45e3e17 /lib/formatters/simple.js
parent204d9a1e0a3dd36bc3f91800ab82e9075610b94e (diff)
Makes the simple formatter useful
Diffstat (limited to 'lib/formatters/simple.js')
-rw-r--r--lib/formatters/simple.js6
1 files changed, 4 insertions, 2 deletions
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;
}
});