lib/lorekeeper/multi_logger.rb in lorekeeper-1.7.1 vs lib/lorekeeper/multi_logger.rb in lorekeeper-1.7.2

- old
+ new

@@ -14,12 +14,18 @@ def inspect "Lorekeeper multilogger, loggers: #{@loggers.map(&:inspect)}" end +if RUBY_VERSION > "2.6" + def respond_to?(method, all_included = false) + @loggers.all? { |logger| logger.respond_to?(method, all_included) } + end +else def respond_to?(method) @loggers.all? { |logger| logger.respond_to?(method) } end +end def method_missing(method, *args, &block) result = @loggers.map do |logger| logger.public_send(method, *args, &block) if logger.respond_to?(method) end