./lib/le.rb in le-2.2.1 vs ./lib/le.rb in le-2.2.2
- old
+ new
@@ -11,11 +11,16 @@
opt_local = options[:local] || false
opt_debug = options[:debug] || false
opt_ssl = options[:ssl] || false
opt_log_level = options[:log_level] || Logger::DEBUG
- host = Le::Host.new(token, opt_local, opt_debug, opt_ssl)
- logger = Logger.new(host)
+ host = Le::Host.new(token, opt_local, opt_debug, opt_ssl)
+
+ if defined?(ActiveSupport::Logger)
+ logger = ActiveSupport::Logger.new(host)
+ else
+ logger = Logger.new(host)
+ end
logger.level = opt_log_level
if host.respond_to?(:formatter)
logger.formatter = host.formatter