<commit_before># Avro
# require patches for avro to allow for logical types in schemas
require "avro_patches"
require "avro_turf/messaging"

module Streamy
  class AvroEvent < Event
    def payload
      avro.encode(payload_attributes.deep_stringify_keys, schema_name: type)
    end

    private

      def avro
        AvroTurf::Messaging.new(
          registry_url: Streamy.configuration.avro_schema_registry_url,
          schemas_path: Streamy.configuration.avro_schemas_path
        )
      end
  end
end<commit_msg>Pass logger into AvroTruf::Messaging initializer<commit_after># Avro
# require patches for avro to allow for logical types in schemas
require "avro_patches"
require "avro_turf/messaging"

module Streamy
  class AvroEvent < Event
    def payload
      avro.encode(payload_attributes.deep_stringify_keys, schema_name: type)
    end

    private

      def avro
        AvroTurf::Messaging.new(
          registry_url: Streamy.configuration.avro_schema_registry_url,
          schemas_path: Streamy.configuration.avro_schemas_path,
          logger: ::Streamy.logger
        )
      end
  end
end
{'fraction_non_alphanumeric': 0.05829596412556054, 'fraction_numerical': 0.0, 'mean_word_length': 3.2595419847328246, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '5254218', 'n_tokens_mistral': 354, 'n_tokens_neox': 338, 'n_words': 83}