diff options
author | Tom Gilbert <tom@linuxbrit.co.uk> | 2005-09-09 20:59:15 +0000 |
---|---|---|
committer | Tom Gilbert <tom@linuxbrit.co.uk> | 2005-09-09 20:59:15 +0000 |
commit | e49bf78b94326449489a6ab43f01f7fe7854ef02 (patch) | |
tree | 50377bc7ee21fa06406cfbb342c5a28c765eb02b /lib | |
parent | d63dac137c32c46b3c9b3c757ded2b9bd9d336be (diff) |
timestamp debug logs
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rbot/ircbot.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb index 167cc0bc..ddc53d98 100644 --- a/lib/rbot/ircbot.rb +++ b/lib/rbot/ircbot.rb @@ -5,7 +5,8 @@ require 'fileutils' $debug = false unless $debug # print +message+ if debugging is enabled def debug(message=nil) - print "DEBUG: #{message}\n" if($debug && message) + stamp = Time.now.strftime("%Y/%m/%d %H:%M:%S") + print "D: [#{stamp}] #{message}\n" if($debug && message) #yield end |