<commit_before>module BrmClient
  class Logger
    include BrmClient::Event
    
    def sequence_number
      @sequence_number ||= 0
      @sequence_number += 1
    end
    
    attr_reader :gateway, :application
    attr_accessor :facet_id, :user_id
    
    def initialize(application, gateway_options = {}, *opts)
     @application = application
     @options = {
       :timestamp_format => "time"
     }.merge(opts.extract_options! || {})
     gateway_type = gateway_options.delete(:type) || "File"
     gateway_options[:application] ||= application
     @gateway = BrmClient::Gateway.const_get(gateway_type).new(gateway_options)
    end
    
    def disconnect
      @gateway.disconnect
    end
    
    private 
    
    def send_event e
      @gateway.send_event(e)
    end
    
    def event(event_name, data=nil, context=nil, event_ref="")
      event = HashWithIndifferentAccess.new<commit_msg>Default timestamp_format is now timestamp instead of time<commit_after>module BrmClient
  class Logger
    include BrmClient::Event
    
    def sequence_number
      @sequence_number ||= 0
      @sequence_number += 1
    end
    
    attr_reader :gateway, :application
    attr_accessor :facet_id, :user_id
    
    def initialize(application, gateway_options = {}, *opts)
     @application = application
     @options = {
       :timestamp_format => "timestamp"
     }.merge(opts.extract_options! || {})
     gateway_type = gateway_options.delete(:type) || "File"
     gateway_options[:application] ||= application
     @gateway = BrmClient::Gateway.const_get(gateway_type).new(gateway_options)
    end
    
    def disconnect
      @gateway.disconnect
    end
    
    private 
    
    def send_event e
      @gateway.send_event(e)
    end
    
    def event(event_name, data=nil, context=nil, event_ref="")
      event = HashWithIndifferentAccess.new
{'fraction_non_alphanumeric': 0.09564750134336378, 'fraction_numerical': 0.0021493820526598604, 'mean_word_length': 2.928270042194093, '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': '3794273', 'n_tokens_mistral': 576, 'n_tokens_neox': 565, 'n_words': 114}