lib/onering/config.rb in onering-client-0.0.83 vs lib/onering/config.rb in onering-client-0.0.84
- old
+ new
@@ -25,15 +25,21 @@
@_configfiles_seen ||= Set.new()
# only load files we haven't seen before
(@_configfiles - @_configfiles_seen.to_a).each do |i|
c = YAML.load(File.read(File.expand_path(i))) rescue {}
+ Onering::Logger.info("Loading config file at #{File.expand_path(i) rescue i}", "Onering::Config") unless c.empty?
+
@_config.deep_merge!(c)
@_configfiles_seen << i
end
+
# settings specified in the library override everything
- @_config.deep_merge!(config.compact) unless config.empty?
+ unless config.empty?
+ Onering::Logger.debug("Merging settings specified in library instantiation", "Onering::Config")
+ @_config.deep_merge!(config.compact)
+ end
return @_config
end
def get(key, default=nil)
\ No newline at end of file