Module: EZDyn
- Defined in:
- lib/ezdyn/log.rb,
lib/ezdyn/crud.rb,
lib/ezdyn/zone.rb,
lib/ezdyn/client.rb,
lib/ezdyn/consts.rb,
lib/ezdyn/record.rb,
lib/ezdyn/changes.rb,
lib/ezdyn/version.rb,
lib/ezdyn/response.rb,
lib/ezdyn/record_type.rb
Overview
Base module for the ezdyn gem. Offers logging functionality via module methods #debug and #info.
Set the environment variable ‘EZDYN_DEBUG` to any value to enable debug logging to `stderr`.
Defined Under Namespace
Classes: Change, Client, CreateChange, DeleteChange, EZDynLog, Record, RecordType, Response, UpdateChange, Zone
Constant Summary collapse
- API_RETRY_DELAY_SECONDS =
baseline delay seconds
1.0
- API_RETRY_BACKOFF =
exponential backoff extra wait
1.5
- API_RETRY_MAX_ATTEMPTS =
max retry count
20
- VERSION =
The version number of the library.
"0.4.0"
- @@logger =
if ENV["EZDYN_DEBUG"] EZDyn::EZDynLog.new end
Class Method Summary collapse
-
.debug(&block) ⇒ Object
Logs a debug message to the default logger containing the value yielded by the given block.
-
.info(&block) ⇒ Object
Logs an info-level message to the default logger containing the value yielded by the given block.
Class Method Details
.debug(&block) ⇒ Object
Logs a debug message to the default logger containing the value yielded by the given block.
34 35 36 37 38 |
# File 'lib/ezdyn/log.rb', line 34 def self.debug &block if block_given? and not @@logger.nil? @@logger.logger.debug { yield } end end |
.info(&block) ⇒ Object
Logs an info-level message to the default logger containing the value yielded by the given block.
42 43 44 45 46 |
# File 'lib/ezdyn/log.rb', line 42 def self.info &block if block_given? and not @@logger.nil? @@logger.logger.info { yield } end end |