lib/ougai/logger.rb in ougai-1.8.1 vs lib/ougai/logger.rb in ougai-1.8.2

- old
+ new

@@ -36,16 +36,12 @@ # Broadcasts the same logs to the another logger # @param logger [Logger] The logger receiving broadcast logs. def self.broadcast(logger) Module.new do |mdl| - Logger::Severity.constants.each do |severity| - method_name = severity.downcase.to_sym - - mdl.send(:define_method, method_name) do |*args| - logger.send(method_name, *args) - super(*args) - end + define_method(:log) do |*args| + logger.log(*args) + super(*args) end define_method(:level=) do |level| logger.level = level super(level)