lib/mini_magick/configuration.rb in mini_magick-4.4.0 vs lib/mini_magick/configuration.rb in mini_magick-4.5.0

- old
+ new

@@ -1,6 +1,7 @@ require 'mini_magick/utilities' +require 'logger' module MiniMagick module Configuration ## @@ -84,10 +85,11 @@ def self.extended(base) base.validate_on_create = true base.validate_on_write = true base.whiny = true base.shell_api = "open3" + base.logger = Logger.new($stdout) end ## # @yield [self] # @example @@ -138,16 +140,17 @@ def cli_path @cli_path || @processor_path end - def logger - @logger || MiniMagick::Logger.new($stdout) + def debug=(value) + warn "MiniMagick.debug is deprecated and will be removed in MiniMagick 5. Use `MiniMagick.logger.level = Logger::DEBUG` instead." + logger.level = Logger::DEBUG end # Backwards compatibility def reload_tools - warn "[MiniMagick] MiniMagick.reload_tools is deprecated because it is no longer necessary" + warn "MiniMagick.reload_tools is deprecated because it is no longer necessary" end end end