0
@@ -55,9 +55,7 @@ module God
0
result = condition.test
0
- msg = watch.name + ' ' + condition.class.name + " [#{result}] " + self.dest_desc(metric, condition)
0
- LOG.log(watch, :info, msg)
0
+ self.log(watch, metric, condition, result)
0
@@ -113,9 +111,8 @@ module God
0
watch.mutex.synchronize do
0
- msg = watch.name + ' ' + condition.class.name + " [true] " + self.dest_desc(metric, condition)
0
- LOG.log(watch, :info, msg)
0
+ self.log(watch, metric, condition, true)
0
@@ -142,12 +139,44 @@ module God
0
+ def self.log(watch, metric, condition, result)
0
+ # log info if available
0
+ if (metric.destination && metric.destination.keys.size == 2) || result == true
0
+ Array(condition.info).each do |condition_info|
0
+ msg = "#{watch.name} #{status} #{condition_info} (#{condition.base_name})"
0
+ LOG.log(watch, :info, msg % [])
0
+ puts e.backtrace.join("\n")
0
+ msg = "#{watch.name} [unknown] (#{condition.base_name})"
0
+ LOG.log(watch, :info, msg % [])
0
+ msg = watch.name + ' ' + condition.base_name + " [#{result}] " + self.dest_desc(metric, condition)
0
+ LOG.log(watch, :debug, msg)
0
def self.dest_desc(metric, condition)
0
- metric.destination.inspect
0
+ if condition.transition
0
+ {true => condition.transition}.inspect
0
- if condition.transition
0
- {true => condition.transition}.inspect
0
+ metric.destination.inspect
Comments
No one has commented yet.