<commit_before>module Circuitry
  module Processor
    def process
      raise NotImplementedError, "#{self} must implement class method `process`"
    end

    def flush
      raise NotImplementedError, "#{self} must implement class method `flush`"
    end

    protected

    def safely_process(&block)
      begin
        block.call
      rescue => e
        logger.error("Error publishing message: #{e}")
        error_handler.call(e) if error_handler
      end
    end

    def pool
      @pool ||= []
    end

    private

    def logger
      Circuitry.config.logger
    end

    def error_handler
      Circuitry.config.error_handler
    end
  end
end<commit_msg>Use more generic logger message<commit_after>module Circuitry
  module Processor
    def process
      raise NotImplementedError, "#{self} must implement class method `process`"
    end

    def flush
      raise NotImplementedError, "#{self} must implement class method `flush`"
    end

    protected

    def safely_process(&block)
      begin
        block.call
      rescue => e
        logger.error("Error handling message: #{e}")
        error_handler.call(e) if error_handler
      end
    end

    def pool
      @pool ||= []
    end

    private

    def logger
      Circuitry.config.logger
    end

    def error_handler
      Circuitry.config.error_handler
    end
  end
end
{'fraction_non_alphanumeric': 0.06921944035346098, 'fraction_numerical': 0.0, 'mean_word_length': 2.274698795180723, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4907816', 'n_tokens_mistral': 393, 'n_tokens_neox': 380, 'n_words': 117}