<commit_before><commit_msg>- add (unused, yet) tool to try and better-capture missing libs.<commit_after>require "logger"
require "logstash/namespace"

module LogStash::Util::Require
  class << self
    attr_accessor :logger

    def require(lib, gemdep, message=nil)
      @logger ||= Logger.new(STDERR)
      begin
        require lib
      rescue LoadError => e
        @logger.error("Failed loading '#{lib}'")
      end
    end # def require
  end # class << self
end # def LogStash::Util::Require
{'fraction_non_alphanumeric': 0.1157684630738523, 'fraction_numerical': 0.0, 'mean_word_length': 3.3275862068965516, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 4, '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': '7302005', 'n_tokens_mistral': 152, 'n_tokens_neox': 150, 'n_words': 45}