<commit_before>require 'active_support/concern'

module Grape
  module DSL
    module Configuration
      extend ActiveSupport::Concern

      module ClassMethods
        attr_writer :logger
        # attr_reader :settings

        include Grape::DSL::Settings

        def logger(logger = nil)
          if logger
            global_setting(:logger, logger)
          else
            global_setting(:logger, Logger.new($stdout)) unless global_setting(:logger)
            global_setting(:logger)
          end
        end

        # Add a description to the next namespace or function.
        def desc(description, options = {})
          namespace_setting :description, options.merge(description: description)
          route_setting :description, options.merge(description: description)<commit_msg>A small tiny refactor in the logger configuration.<commit_after>require 'active_support/concern'

module Grape
  module DSL
    module Configuration
      extend ActiveSupport::Concern

      module ClassMethods
        attr_writer :logger
        # attr_reader :settings

        include Grape::DSL::Settings

        def logger(logger = nil)
          if logger
            global_setting(:logger, logger)
          else
            global_setting(:logger) || global_setting(:logger, Logger.new($stdout))
          end
        end

        # Add a description to the next namespace or function.
        def desc(description, options = {})
          namespace_setting :description, options.merge(description: description)
          route_setting :description, options.merge(description: description)
{'fraction_non_alphanumeric': 0.06986899563318777, 'fraction_numerical': 0.0, 'mean_word_length': 2.5644444444444443, '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': '1660343', 'n_tokens_mistral': 385, 'n_tokens_neox': 369, 'n_words': 110}