<commit_before># Logging configuration for the whole app.
#
# For details see https://github.com/TwP/logging

require 'logging'

Logging.logger.root.appenders = Logging.appenders.stdout(
  layout: Logging::Layouts.pattern(format_as: :inspect, pattern: '%-5l [%c]: %m\n')
)
Logging.logger.root.level = (ENV['RACK_ENV'] == 'production' ? :info : :debug)
<commit_msg>Use Config.rack_env in initializers/logging and refactor it a bit<commit_after># Logging configuration for the whole app.
#
# For details see https://github.com/TwP/logging

require 'logging'

Logging.logger.root.tap do |root|
  root.appenders = Logging.appenders.stdout(
    layout: Logging::Layouts.pattern(format_as: :inspect, pattern: '%-5l [%c]: %m\n')
  )
  root.level = (Config.rack_env == 'production' ? :info : :debug)
end

{'fraction_non_alphanumeric': 0.15326633165829145, 'fraction_numerical': 0.002512562814070352, 'mean_word_length': 4.9037037037037035, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '642127', 'n_tokens_mistral': 280, 'n_tokens_neox': 276, 'n_words': 66}