<commit_before># coding: utf-8
require File.join(File.dirname(__FILE__), 'environment')
require File.join(File.dirname(__FILE__), 'database')

require 'chaindrive'

# Set a default logger that for production environments will write to the
# system log. From there we can pipe that to logstash.
if Chaindrive.development?
  require 'logger'
  $logger = Logger.new($stdout)
  $logger.level = Logger::DEBUG
else
  require 'syslogger'
  $logger = Syslogger.new('chaindrive', Syslog::LOG_PID, Syslog::LOG_LOCAL0)
  $logger.level = Logger::INFO
end

<commit_msg>Setup logger appropriately for Sidekiq/Grape.<commit_after># coding: utf-8
require File.join(File.dirname(__FILE__), 'environment')
require File.join(File.dirname(__FILE__), 'database')

require 'chaindrive'

# Set a default logger that for production environments will write to the
# system log. From there we can pipe that to logstash.
if Chaindrive.development?
  require 'logger'
  $logger = Logger.new($stdout)
  $logger.level = Logger::DEBUG
else
  require 'syslogger'
  $logger = Syslogger.new('chaindrive', Syslog::LOG_PID, Syslog::LOG_LOCAL0)
  $logger.level = Logger::INFO
end

Grape::API.logger = $logger if defined?(Sidekiq)
Sidekiq.logger = $logger if defined?(Sidekiq)
{'fraction_non_alphanumeric': 0.11793214862681745, 'fraction_numerical': 0.0032310177705977385, 'mean_word_length': 5.661290322580645, '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': '4175083', 'n_tokens_mistral': 393, 'n_tokens_neox': 381, 'n_words': 114}