Permalink
Browse files

Update "log" function.

Add support to customize "timestamp" format and value.
  • Loading branch information...
Math- committed Jun 29, 2012
1 parent c4313dd commit fa583b94f4a04d54a7e34d85e5d63f93eac4ff3c
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/util.js
View
@@ -457,8 +457,8 @@ function timestamp() {
}
-exports.log = function(msg) {
- exports.puts(timestamp() + ' - ' + msg.toString());
+exports.log = function(msg, timestampValue) {
+ exports.puts(typeof timestampValue != "undefined" ? timestampValue.toString() : timestamp() + ' - ' + msg.toString());
};

0 comments on commit fa583b9

Please sign in to comment.