mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
Merge pull request #432 from electrofelix/fix-logging
Ensure correct order of logger creation
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
require 'pathname'
|
||||
require 'vagrant-libvirt/plugin'
|
||||
|
||||
module VagrantPlugins
|
||||
module ProviderLibvirt
|
||||
@@ -27,3 +26,6 @@ module VagrantPlugins
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# make sure base module class defined before loading plugin
|
||||
require 'vagrant-libvirt/plugin'
|
||||
|
||||
@@ -24,10 +24,6 @@ module VagrantPlugins
|
||||
end
|
||||
|
||||
provider('libvirt', parallel: true) do
|
||||
# Setup logging and i18n
|
||||
setup_logging
|
||||
setup_i18n
|
||||
|
||||
require_relative 'provider'
|
||||
Provider
|
||||
end
|
||||
@@ -90,6 +86,12 @@ module VagrantPlugins
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user