From 39989c6e7aed79ac7a8a0a46523a4b462e5d5c55 Mon Sep 17 00:00:00 2001 From: Simo Kinnunen Date: Wed, 29 Jan 2014 18:14:05 +0900 Subject: [PATCH] Don't force new timestamp in Log.Entry constructor. --- lib/util/logger.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/util/logger.js b/lib/util/logger.js index d455ca1e..46de6afa 100644 --- a/lib/util/logger.js +++ b/lib/util/logger.js @@ -27,8 +27,8 @@ function Log(tag, stream) { util.inherits(Log, events.EventEmitter) -Log.Entry = function(priority, tag, pid, identifier, message) { - this.time = Date.now() +Log.Entry = function(time, priority, tag, pid, identifier, message) { + this.time = time this.priority = priority this.tag = tag this.pid = pid @@ -70,7 +70,8 @@ Log.prototype._color = function(priority) { Log.prototype._entry = function(priority, args) { return new Log.Entry( - priority + Date.now() + , priority , this.tag , process.pid , this.localIdentifier || Log.globalIdentifier