# File lib/hiera/config.rb, line 8 def load(source) @config = {:backends => "yaml", :hierarchy => "common"} if source.is_a?(String) raise "Config file #{source} not found" unless File.exist?(source) config = YAML.load_file(source) @config.merge! config if config elsif source.is_a?(Hash) @config.merge! source end @config[:backends] = [ @config[:backends] ].flatten if @config.include?(:logger) Hiera.logger = @config[:logger].to_s else @config[:logger] = "console" Hiera.logger = "console" end @config end