lib/chatterbot/logging.rb in chatterbot-1.0.2 vs lib/chatterbot/logging.rb in chatterbot-2.0.0.pre

- old
+ new

@@ -19,26 +19,9 @@ def critical(s) puts s debug s end - # - # log a tweet to the database - def log(txt, source=nil) - return unless log_tweets? - - data = {:txt => txt, :bot => botname, :created_at => Time.now} - - if source != nil - data = data.merge(:user => source.user.screen_name, - :source_id => source.id, - :source_tweet => source.text) - end - - # populate the table - db[:tweets].insert(data) - end - protected # # initialize a Logger object, writing to log_dest def logger # log to the dest specified in the config file, rollover after 10mb of data