{"issue":{"pull_request":{"diff_url":"https://github.com/karmi/tire/pull/142.diff","html_url":"https://github.com/karmi/tire/pull/142","patch_url":"https://github.com/karmi/tire/pull/142.patch"},"state":"closed","user":{"avatar_url":"https://secure.gravatar.com/avatar/a5fbe519e174b9393c97c8270d501fac?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"a5fbe519e174b9393c97c8270d501fac","url":"https://api.github.com/users/gtarnovan","login":"gtarnovan","id":157092},"milestone":null,"labels":[],"assignee":null,"updated_at":"2011-11-07T12:25:28Z","comments":6,"closed_at":"2011-11-04T14:20:10Z","url":"https://api.github.com/repos/karmi/tire/issues/142","body":"e.g. if the elastic search server is not running (or other causes if SearchRequestFailed in Tire::Search::Search#perform) the logger try to print the a null body and results in:\r\n\r\nactivesupport (3.1.0) lib/active_support/whiny_nil.rb:48:in `method_missing'\r\ntire (0.3.8) lib/tire/logger.rb:50:in `log_response'\r\ntire (0.3.8) lib/tire/search.rb:124:in `logged'\r\ntire (0.3.8) lib/tire/search.rb:80:in `perform'\r\ntire (0.3.8) lib/tire/model/search.rb:97:in `search'\r\ntire (0.3.8) lib/tire/model/search.rb:264:in `__send__'\r\ntire (0.3.8) lib/tire/model/search.rb:264:in `search'","html_url":"https://github.com/karmi/tire/issues/142","number":142,"title":"on debug level, the logger will fail when performing a search fails","id":2130980,"created_at":"2011-11-03T10:26:10Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/4e515deb518e9195f0dc45ec2af6a541?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"4e515deb518e9195f0dc45ec2af6a541","url":"https://api.github.com/users/karmi","login":"karmi","id":4790},"updated_at":"2011-11-07T12:25:28Z","url":"https://api.github.com/repos/karmi/tire/issues/comments/2652826","body":"For an example:\r\n\r\n```ruby\r\nrequire 'fileutils'\r\nrequire 'active_support/buffered_logger'\r\n\r\nmylog = ActiveSupport::BufferedLogger.new 'buffered-logger.log'\r\nmylog.instance_eval do\r\n  alias :write :info\r\nend\r\n\r\nrequire 'tire'\r\n\r\nTire.configure { logger mylog }\r\n\r\nTire.index('logger-articles') do\r\n  delete\r\n  create\r\n  store :title => 'One', :tags => ['ruby']\r\n  refresh\r\nend\r\n\r\nTire.search('logger-articles') { query { string 'One' } }\r\n```","id":2652826,"created_at":"2011-11-07T12:25:28Z"}}