summaryrefslogtreecommitdiff
path: root/util.coffee
diff options
context:
space:
mode:
authorYaohan Chen <yaohan.chen@gmail.com>2014-04-01 10:46:35 -0400
committerYaohan Chen <yaohan.chen@gmail.com>2014-04-01 10:46:35 -0400
commita3e46566bb6815a59333b02be0b338bbd336e43f (patch)
treea114a14dfb4a1062f2896acf7abf35f6cd594a0b /util.coffee
parent4bee69cb5c9a5260b706f769f175818b322f5d26 (diff)
downloadhib-dlagent-a3e46566bb6815a59333b02be0b338bbd336e43f.tar.gz
hib-dlagent-a3e46566bb6815a59333b02be0b338bbd336e43f.zip
Make logs include timestamps
Diffstat (limited to 'util.coffee')
-rw-r--r--util.coffee3
1 files changed, 2 insertions, 1 deletions
diff --git a/util.coffee b/util.coffee
index 169cc35..bd6403d 100644
--- a/util.coffee
+++ b/util.coffee
@@ -2,7 +2,8 @@ system = require('system')
# prints a log message if the LOG environment variable is set
if system.env.LOG?
- exports.log = log = system.stderr.writeLine
+ exports.log = log = (message) ->
+ system.stderr.writeLine "#{new Date().toString()} #{message}"
else
exports.log = log = ->