<commit_before>module Skr::Core

    @logger = if defined?(::Rails)
                  Rails.logger
              else
                  Logger.new(STDERR)
              end
    class << self
        def logger
            @logger
        end

        def logger=( logger )
            @logger = logger
        end

        def silence_logs( &block )
            old_logger = Skr::Core.logger
            begin
                Skr::Core.logger=Logger.new( StringIO.new )
                yield
            ensure
                Skr::Core.logger=old_logger
            end
        end
    end
end
<commit_msg>add logger_debug method for highlighting logging<commit_after># -*- coding: utf-8 -*-
module Skr::Core

    @logger = if defined?(::Rails)
                  Rails.logger
              else
                  Logger.new(STDERR)
              end
    class << self
        def logger
            @logger
        end

        def logger=( logger )
            @logger = logger
        end

        def silence_logs( &block )
            old_logger = Skr::Core.logger
            begin
                Skr::Core.logger=Logger.new( StringIO.new )
                yield
            ensure
                Skr::Core.logger=old_logger
            end
        end

        def logger_debug( output )
            logger.debug '⚡ '*40
            logger.debug '⚡ ' + output
            logger.debug '⚡ '*40
        end
    end
end

{'fraction_non_alphanumeric': 0.0785413744740533, 'fraction_numerical': 0.0035063113604488078, 'mean_word_length': 1.0923753665689149, 'pattern_counts': {'":': 0, '<': 7, '<?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': '4474748', 'n_tokens_mistral': 383, 'n_tokens_neox': 366, 'n_words': 93}