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.

18 lines
434 B

  1. module Semantic
  2. module Subscribers
  3. class LogSubscriber
  4. attr_reader :logger, :event_group
  5. def initialize(event_group)
  6. @event_group = event_group
  7. @logger = SemanticLogger[event_group.to_s]
  8. end
  9. def any_hook(event)
  10. logger.warn(
  11. "#{@event_group} hook=<#{event.name.split('.')[0]}> needs a proper message handling!", event.payload.keys
  12. )
  13. end
  14. end
  15. end
  16. end