Class: Onelogin::Saml::Logging

Inherits:
Object
  • Object
show all
Defined in:
lib/onelogin/ruby-saml/logging.rb

Class Method Summary collapse

Class Method Details

.debug(message) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'lib/onelogin/ruby-saml/logging.rb', line 5

def self.debug(message)
  return if !!ENV["ruby-saml/testing"]

  if defined? Rails
    Rails.logger.debug message
  else
    puts message
  end
end

.info(message) ⇒ Object



15
16
17
18
19
20
21
22
23
# File 'lib/onelogin/ruby-saml/logging.rb', line 15

def self.info(message)
  return if !!ENV["ruby-saml/testing"]

  if defined? Rails
    Rails.logger.info message
  else
    puts message
  end
end