<commit_before># frozen_string_literal: true

module BlogNotification
  class Log

    # ActiveSupport::Logger instance.
    #
    # @return [ActiveSupport::Logger]
    attr_reader :logger

    # Initialize Log class instance.
    def initialize(program_name)
      @logger = ActiveSupport::Logger.new('/dev/null')
      @logger.progname = @program_name = program_name
    end

    # Push new logger
    #
    # @param output [String] Log file path.
    # @param level [Symbol, String] Logger level.
    def push_logger(output, level)
      new_logger = ActiveSupport::Logger.new(output)
      new_logger.level = level
      new_logger.formatter = Logger::Formatter.new
      new_logger.progname = @program_name<commit_msg>Set 'nil' to NullLogger<commit_after># frozen_string_literal: true

module BlogNotification
  class Log

    # ActiveSupport::Logger instance.
    #
    # @return [ActiveSupport::Logger]
    attr_reader :logger

    # Initialize Log class instance.
    def initialize(program_name)
      @logger = ActiveSupport::Logger.new(nil)
      @logger.progname = @program_name = program_name
    end

    # Push new logger
    #
    # @param output [String] Log file path.
    # @param level [Symbol, String] Logger level.
    def push_logger(output, level)
      new_logger = ActiveSupport::Logger.new(output)
      new_logger.level = level
      new_logger.formatter = Logger::Formatter.new
      new_logger.progname = @program_name
{'fraction_non_alphanumeric': 0.09392265193370165, 'fraction_numerical': 0.0, 'mean_word_length': 3.28698224852071, 'pattern_counts': {'":': 0, '<': 3, '<?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': '747949', 'n_tokens_mistral': 427, 'n_tokens_neox': 412, 'n_words': 104}