Commits

Magnus Hoff  committed 043ec50

Switched to proper time format (24h)

  • Participants
  • Parent commits b78357b

Comments (0)

Files changed (2)

 
 Example output:
 
-	04:46:06.004 2013-04-17 Wednesday
-	04:46:06.007 [module a] Log message 1
-	04:46:06.008 [module a, submodule a1] Log message 2
-	04:46:06.008 [module b] Log message 3
+	16:46:06.004 2013-04-17 Wednesday
+	16:46:06.007 [module a] Log message 1
+	16:46:06.008 [module a, submodule a1] Log message 2
+	16:46:06.008 [module b] Log message 3
 
 Except the output is in *glorious* color!
 
 	this.target = options.target || process.stdout;
 
 	this.prevTimestamp = new Date();
-	this.target.write(moment(this.prevTimestamp).format('hh:mm:ss.SSS YYYY-MM-DD dddd').grey + '\n');
+	this.target.write(moment(this.prevTimestamp).format('HH:mm:ss.SSS YYYY-MM-DD dddd').grey + '\n');
 };
 util.inherits(TaggedConsoleTarget, winston.Transport);
 
 
 	if (moment(timestamp).format('YYYY-MM-DD') !== moment(this.prevTimestamp).format('YYYY-MM-DD')) {
 		this.prevTimestamp = timestamp;
-		this.target.write(moment(timestamp).format('hh:mm:ss.SSS YYYY-MM-DD dddd').grey + '\n');
+		this.target.write(moment(timestamp).format('HH:mm:ss.SSS YYYY-MM-DD dddd').grey + '\n');
 	}
 
-	this.target.write(moment(timestamp).format('hh:mm:ss.SSS').grey + (' [' + tags.join(', ') + '] ').green + msg[color] + '\n');
+	this.target.write(moment(timestamp).format('HH:mm:ss.SSS').grey + (' [' + tags.join(', ') + '] ').green + msg[color] + '\n');
 	callback(null, true);
 };