<commit_before>class LogMonitor < DeployKit
  def chekc_warning(will_sent = nil)
    cmd = "cat #{log_path} | grep \"200 OK\" | awk '{print $3 \" \" $0}' | sort -nr | head -n 10"
    puts cmd if @verbose
    lines = `#{cmd}`
    return if !need_send?(lines)

   if !will_sent.blank?
     send_mail(lines)
   else
     puts lines
   end
  end

  def allow_time
    @fu_conf[:allow_time_ms].to_i
  end

  def log_path<commit_msg>format log_monitor file<commit_after>class LogMonitor < DeployKit
  def chekc_warning(will_sent = nil)
    cmd = "cat #{log_path} | grep \"200 OK\" | awk '{print $3 \" \" $0}' | sort -nr | head -n 10"
    puts cmd if @verbose
    lines = `#{cmd}`
    return if !need_send?(lines)

    if !will_sent.blank?
      send_mail(lines)
    else
      puts lines
    end
  end

  def allow_time
    @fu_conf[:allow_time_ms].to_i
  end

  def log_path
{'fraction_non_alphanumeric': 0.12428078250863062, 'fraction_numerical': 0.01611047180667434, 'mean_word_length': 2.717948717948718, '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': '493608', 'n_tokens_mistral': 331, 'n_tokens_neox': 324, 'n_words': 89}