3 class Logger < ::Logger
12 def log(watch, level, text)
13 # initialize watch log if necessary
14 self.logs[watch.name] ||= Timeline.new(God::LOG_BUFFER_SIZE_DEFAULT)
16 # push onto timeline for the given watch
18 templog = ::Logger.new(buf)
19 templog.send(level, text)
21 self.logs[watch.name] << [Time.now, buf.string]
25 # send to regular logger
26 self.send(level, text)
29 def watch_log_since(watch_name, since)
30 # initialize watch log if necessary
31 self.logs[watch_name] ||= Timeline.new(God::LOG_BUFFER_SIZE_DEFAULT)
33 # get and join lines since given time
35 self.logs[watch_name].select do |x|