lib/vagrant-libvirt/plugin.rb in vagrant-libvirt-0.0.30 vs lib/vagrant-libvirt/plugin.rb in vagrant-libvirt-0.0.31

- old
+ new

@@ -21,15 +21,11 @@ config('libvirt', :provider) do require_relative 'config' Config end - provider('libvirt', parallel: true) do - # Setup logging and i18n - setup_logging - setup_i18n - + provider('libvirt', parallel: true, box_optional: true) do require_relative 'provider' Provider end action_hook(:remove_libvirt_image) do |hook| @@ -87,9 +83,15 @@ logger.outputters = Log4r::Outputter.stderr logger.level = level logger = nil end end + + # Setup logging and i18n before any autoloading loads other classes + # with logging configured as this prevents inheritance of the log level + # from the parent logger. + setup_logging + setup_i18n end end end