lib/betterlog/notifiers.rb in betterlog-1.1.1 vs lib/betterlog/notifiers.rb in betterlog-2.0.0

- old
+ new

@@ -11,18 +11,20 @@ notifiers << notifier self end def self.notify(event) + event.notify? or return notifiers.each do |notifier| - notifier.notify(event.notify?, event.as_json) + context(event.as_json) + notifier.notify(event[:message], event.as_json) end end - def self.context(data_hash) + def self.context(data) notifiers.each do |notifier| notifier.respond_to?(:context) or next - notifier.context(data_hash) + notifier.context(data) end end end end