You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

19 lines
479 B

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