diff options
author | Yaohan Chen <yaohan.chen@gmail.com> | 2014-04-01 10:46:35 -0400 |
---|---|---|
committer | Yaohan Chen <yaohan.chen@gmail.com> | 2014-04-01 10:46:35 -0400 |
commit | a3e46566bb6815a59333b02be0b338bbd336e43f (patch) | |
tree | a114a14dfb4a1062f2896acf7abf35f6cd594a0b /util.coffee | |
parent | 4bee69cb5c9a5260b706f769f175818b322f5d26 (diff) | |
download | hib-dlagent-a3e46566bb6815a59333b02be0b338bbd336e43f.tar.gz hib-dlagent-a3e46566bb6815a59333b02be0b338bbd336e43f.zip |
Make logs include timestamps
Diffstat (limited to 'util.coffee')
-rw-r--r-- | util.coffee | 3 |
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 = -> |