Module: Savon

Defined in:
lib/savon.rb,
lib/savon/wsdl.rb,
lib/savon/service.rb

Defined Under Namespace

Classes: HTTPError, SOAPFault, Service, WSDL

Constant Summary collapse

@@logger =

The logger to use.

nil
@@log_level =

The log level to use.

:debug

Class Method Summary collapse

Class Method Details

.log(message = nil) ⇒ Object

Logs a given message using the @@logger instance or yields the logger to a given block for logging multiple messages at once.


29
30
31
32
33
34
# File 'lib/savon.rb', line 29

def self.log(message = nil)
  if @@logger
    @@logger.send(@@log_level, message) if message
    yield @@logger if block_given?
  end
end

.log_level=(log_level) ⇒ Object

Sets the log level to use.


23
24
25
# File 'lib/savon.rb', line 23

def self.log_level=(log_level)
  @@log_level = log_level
end

.logger=(logger) ⇒ Object

Sets the logger to use.


18
19
20
# File 'lib/savon.rb', line 18

def self.logger=(logger)
  @@logger = logger
end