Skip to content

Commit

Permalink
Merge pull request #163 from Nexmo/bug-fix
Browse files Browse the repository at this point in the history
Restore Rails.log back to Rails.logger
  • Loading branch information
Ben Greenberg authored Jun 17, 2020
2 parents 452d91c + 5e88484 commit 2035a4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/nexmo/config.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: false
# frozen_string_literal: true
require 'logger'

Expand All @@ -12,7 +12,7 @@ def initialize
self.api_key = T.let(ENV['NEXMO_API_KEY'], T.nilable(String))
self.api_secret = T.let(ENV['NEXMO_API_SECRET'], T.nilable(String))
self.application_id = ENV['NEXMO_APPLICATION_ID']
self.logger = (defined?(Rails.logger) && Rails.log) || Nexmo::Logger.new(nil)
self.logger = (defined?(Rails.logger) && Rails.logger) || Nexmo::Logger.new(nil)
self.private_key = ENV['NEXMO_PRIVATE_KEY_PATH'] ? File.read(T.must(ENV['NEXMO_PRIVATE_KEY_PATH'])) : ENV['NEXMO_PRIVATE_KEY']
self.rest_host = 'rest.nexmo.com'
self.signature_secret = ENV['NEXMO_SIGNATURE_SECRET']
Expand Down

0 comments on commit 2035a4c

Please sign in to comment.