lib/lorekeeper/multi_logger.rb in lorekeeper-1.3.1 vs lib/lorekeeper/multi_logger.rb in lorekeeper-1.4.0
- old
+ new
@@ -13,9 +13,13 @@
def inspect
"Lorekeeper multilogger, loggers: #{@loggers.map(&:inspect)}"
end
+ def 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)
end
# We call all the methods, delete nils and duplicates.