<commit_before>module Travis
  module Services
    class OverwriteLog < Base
      register :overwrite_log

      FORMAT = "Log removed by %s at %s Reason: %s"

      def run(params)
        return nil unless job

        log = job.log
        log.content = FORMAT % [current_user.name, DateTime.now.iso8601, params[:reason]]
        log.archive_verified = false
        log.archived_at = nil
        log.save!
      end

      def log<commit_msg>Clean up overwritten log<commit_after>module Travis
  module Services
    class OverwriteLog < Base
      register :overwrite_log

      FORMAT = "Log removed by %s at %s\n%s"

      def run(params)
        return nil unless job

        log = job.log
        log.content = FORMAT % [current_user.name, DateTime.now.iso8601, params[:reason]]
        log.archive_verified = false
        log.archived_at = nil
        log.save!
      end

      def log
{'fraction_non_alphanumeric': 0.0779510022271715, 'fraction_numerical': 0.008908685968819599, 'mean_word_length': 2.1543859649122807, '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': '4722262', 'n_tokens_mistral': 280, 'n_tokens_neox': 262, 'n_words': 78}