summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaku Ytti <saku@ytti.fi>2016-08-25 15:47:20 +0300
committerSaku Ytti <saku@ytti.fi>2016-08-25 15:47:20 +0300
commit647500ffc78d03bcb07043551bce3684d62ab40d (patch)
treee6112ae24ec7484c235392e9a41b659f8db16a93
parent3f69328f5d01121eb9a8af39779c97943d6cd6d5 (diff)
add debugging to key resolution
-rw-r--r--lib/oxidized/node.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/oxidized/node.rb b/lib/oxidized/node.rb
index 7df353d..2abe096 100644
--- a/lib/oxidized/node.rb
+++ b/lib/oxidized/node.rb
@@ -183,21 +183,26 @@ module Oxidized
key_sym = key.to_sym
key_str = key.to_s
value = global
+ Oxidized.logger.debug "resolving node key #{key}, with global value of #{value} and node value #{opt[key_sym]}"
#global
if not value and Oxidized.config.has_key?(key_str)
value = Oxidized.config[key_str]
+ Oxidized.logger.debug "setting node key #{key} to value #{value} from global"
end
-
+
#group
if Oxidized.config.groups.has_key?(@group)
if Oxidized.config.groups[@group].has.key?(key_str)
value = Oxidized.config.groups[@group][key_str]
+ Oxidized.logger.debug "setting node key #{key} to value #{value} from group"
end
end
#node
- opt[key_sym] || value
+ value = opt[key_sym] || value
+ Oxidized.logger.debug "returning node key #{key} with value #{value}"
+ value
end
def is_git? opt