Permalink
Browse files

Update vk_logger.rb

Allow passing external logger and fix bug with ```NoMethodError: undefined method `debug?' for true:TrueClass```
  • Loading branch information...
1 parent 7100fc8 commit 786d973f8540e3ef7f66354db3f9250980c7f24c @gorkunov gorkunov committed Jun 9, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/vk-ruby/middleware/response/vk_logger.rb
@@ -11,7 +11,7 @@ class VK::MW::Response::VkLogger < Faraday::Response::Middleware
def initialize(app, logger = nil)
super(app)
- @logger = !logger.nil? || begin
+ @logger = logger || begin
require 'logger'
::Logger.new(STDOUT)
end
@@ -43,4 +43,4 @@ def on_complete(env)
end
end
-end
+end

0 comments on commit 786d973

Please sign in to comment.