Sha256: c14d1168765497c15deeab57a6f5f15e4078c7a6a1ffd96b80c7fa256b250c34

Contents?: true

Size: 507 Bytes

Versions: 2

Compression:

Stored size: 507 Bytes

Contents

module Kuroko2
  module ExecutionLogger
    class NotFound < StandardError
    end

    def self.get_logger(**option)
      config = Kuroko2.config.execution_logger
      if config.present? && config.type.present?
        logger_class = const_get(config.type, false)
        if config.option.present?
          logger_class.new(**config.option.to_h.merge(option).symbolize_keys)
        else
          logger_class.new(**option)
        end
      else
        Void.new(**option)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
kuroko2-0.8.0 lib/autoload/kuroko2/execution_logger.rb
kuroko2-0.7.0 lib/autoload/kuroko2/execution_logger.rb