lib/lorekeeper/multi_logger.rb in lorekeeper-1.6.2 vs lib/lorekeeper/multi_logger.rb in lorekeeper-1.7.0
- old
+ new
@@ -1,9 +1,10 @@
# frozen_string_literal: true
+
module Lorekeeper
# Allows to create a logger that will pass information to any logger registered
- # It is useful so send the same message thought different loggers to different sinks
+ # It is useful so send the same message through different loggers to different sinks
class MultiLogger
def initialize
@loggers = []
end
@@ -14,10 +15,10 @@
def inspect
"Lorekeeper multilogger, loggers: #{@loggers.map(&:inspect)}"
end
def respond_to?(method)
- @loggers.all?{ |logger| logger.respond_to?(method) }
+ @loggers.all? { |logger| logger.respond_to?(method) }
end
def method_missing(method, *args, &block)
result = @loggers.map do |logger|
logger.public_send(method, *args, &block) if logger.respond_to?(method)