Skip to content

Commit

Permalink
[fix] #194 adds timestamp to log output
Browse files Browse the repository at this point in the history
  • Loading branch information
svnlto committed Dec 20, 2013
1 parent 0f188e5 commit 4d68ddb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/middleware/loggers.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ exports.dev = function (server_name) {
}

len = isNaN(len) ? '' : len = ' - ' + bytes(len);
var date = new Date();

var logStr = '\033[90m' + '[' + server_name + '] ' + req.method + ' ';
var logStr = '\033[90m' + date.toISOString().split('.')[0] + ' [';
logStr += server_name + '] ' + req.method + ' ';
logStr += '\033[' + color + 'm' + res.statusCode + '\033[90m';
logStr += ' ' + req.originalUrl + ' ';
logStr += (new Date() - req._startTime);
Expand Down

0 comments on commit 4d68ddb

Please sign in to comment.