module Semantic module Subscribers # Abstract LogSubscriber class LogSubscriber attr_reader :logger, :event_group def initialize @event_group = self.class.name.demodulize.underscore.to_sym @logger = SemanticLogger[@event_group] end def any_hook(event) logger.warn( "#{@event_group} hook=<#{event.name.split('.')[0]}> needs a proper message handling!", event.payload.keys ) end end end end