Skip to content

Commit

Permalink
Merge pull request #426 from tily/fix/ensure_rails_responds_to_logger
Browse files Browse the repository at this point in the history
Ensure `Rails` responds to `logger`
  • Loading branch information
pitbulk authored Dec 11, 2017
2 parents 459a53c + 53cae02 commit 8bca922
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/onelogin/ruby-saml/logging.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Logging
DEFAULT_LOGGER = ::Logger.new(STDOUT)

def self.logger
@logger || (defined?(::Rails) && Rails.logger) || DEFAULT_LOGGER
@logger || (defined?(::Rails) && Rails.respond_to?(:logger) && Rails.logger) || DEFAULT_LOGGER
end

def self.logger=(logger)
Expand Down

0 comments on commit 8bca922

Please sign in to comment.