lib/loggability.rb in loggability-0.16.0 vs lib/loggability.rb in loggability-0.17.0
- old
+ new
@@ -7,11 +7,11 @@
# A mixin that provides a top-level logging subsystem based on Logger.
module Loggability
# Package version constant
- VERSION = '0.16.0'
+ VERSION = '0.17.0'
# The key for the global logger (Loggability's own logger)
GLOBAL_KEY = :__global__
# The methods that are delegated across all loggers
@@ -144,16 +144,16 @@
# :section: Aggregate Methods
#
### Call the method with the given +methodname+ across the loggers of all loghosts with
### the given +arg+ and/or +block+.
- def self::aggregate( methodname, arg, &block )
+ def self::aggregate( methodname, *args, &block )
# self.log.debug "Aggregating a call to %p with %p to %d log hosts" %
# [ methodname, arg, Loggability.log_hosts.length ]
Loggability.log_hosts.values.each do |loghost|
# self.log.debug " %p.logger.%s( %p )" % [ loghost, methodname, arg ]
- loghost.logger.send( methodname, arg, &block )
+ loghost.logger.send( methodname, *args, &block )
end
end
##
@@ -189,11 +189,11 @@
# output_to( destination )
# write_to( destination )
#
# Aggregate method: set all loggers to log to +destination+. See Loggability::Logger#output_to
# for more info.
- def self::output_to( newdevice )
- self.aggregate( :output_to, newdevice )
+ def self::output_to( newdevice, *args )
+ self.aggregate( :output_to, newdevice, *args )
end
class << self
alias_method :write_to, :output_to
end