<commit_before>module Kookie
  module PureFTPD

    class Interface < Sinatra::Base

      get '/' do
        log_lines = File.readlines('test/support_files/transfers.log').reverse[0, ENV['TAIL_LINES'].to_i].to_a
        @logs = LogParser.new(log_lines).parse<commit_msg>Reading the log from the specified path in LOG_FILE<commit_after>module Kookie
  module PureFTPD

    class Interface < Sinatra::Base

      get '/' do
        log_lines = File.readlines(ENV['LOG_PATH']).reverse[0, ENV['TAIL_LINES'].to_i].to_a
        @logs = LogParser.new(log_lines).parse
{'fraction_non_alphanumeric': 0.11942959001782531, 'fraction_numerical': 0.0035650623885918, 'mean_word_length': 3.683333333333333, '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': '4599789', 'n_tokens_mistral': 196, 'n_tokens_neox': 184, 'n_words': 35}