# File lib/god/logger.rb, line 33 def log(watch, level, text) # initialize watch log if necessary self.logs[watch.name] ||= Timeline.new(God::LOG_BUFFER_SIZE_DEFAULT) if watch # push onto capture and timeline for the given watch buf = StringIO.new templog = ::Logger.new(buf) templog.level = Logger::INFO templog.send(level, text % []) @mutex.synchronize do @capture.puts(buf.string) if @capture self.logs[watch.name] << [Time.now, buf.string] if watch end templog.close # send to regular logger self.send(level, text % []) # send to syslog Syslog.send(SYSLOG_EQUIVALENTS[level], text) end