Skip to content

Commit 53cae02

Browse files
committed
ensure Rails responds to logger
1 parent 459a53c commit 53cae02

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/onelogin/ruby-saml/logging.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class Logging
77
DEFAULT_LOGGER = ::Logger.new(STDOUT)
88

99
def self.logger
10-
@logger || (defined?(::Rails) && Rails.logger) || DEFAULT_LOGGER
10+
@logger || (defined?(::Rails) && Rails.respond_to?(:logger) && Rails.logger) || DEFAULT_LOGGER
1111
end
1212

1313
def self.logger=(logger)

0 commit comments

Comments
 (0)