Module: Savon::Logger::ClassMethods
- Defined in:
- lib/savon/logger.rb
Instance Method Summary collapse
-
#log=(log) ⇒ Object
Sets whether to log.
-
#log? ⇒ Boolean
Returns whether to log.
-
#log_level ⇒ Object
Returns the log level.
-
#log_level=(log_level) ⇒ Object
Sets the log level.
-
#logger ⇒ Object
Returns the logger.
-
#logger=(logger) ⇒ Object
Sets the logger.
Instance Method Details
#log=(log) ⇒ Object
Sets whether to log.
14 15 16 |
# File 'lib/savon/logger.rb', line 14 def log=(log) @log = log end |
#log? ⇒ Boolean
Returns whether to log. Defaults to true
.
19 20 21 |
# File 'lib/savon/logger.rb', line 19 def log? @log != false end |
#log_level ⇒ Object
Returns the log level. Defaults to debug
.
39 40 41 |
# File 'lib/savon/logger.rb', line 39 def log_level @log_level ||= :debug end |
#log_level=(log_level) ⇒ Object
Sets the log level.
34 35 36 |
# File 'lib/savon/logger.rb', line 34 def log_level=(log_level) @log_level = log_level end |
#logger ⇒ Object
Returns the logger. Defaults to an instance of Logger
writing to STDOUT.
29 30 31 |
# File 'lib/savon/logger.rb', line 29 def logger @logger ||= ::Logger.new STDOUT end |
#logger=(logger) ⇒ Object
Sets the logger.
24 25 26 |
# File 'lib/savon/logger.rb', line 24 def logger=(logger) @logger = logger end |