|
# File log4r/logger.rb, line 114
def add(*_outputters)
for thing in _outputters
o = (thing.kind_of?(Outputter) ? thing : Outputter[thing])
# some basic validation
if not o.kind_of?(Outputter)
raise TypeError, "Expected kind of Outputter, got #{o.type}", caller
elsif o.nil?
raise TypeError, "Couldn't find Outputter '#{thing}'", caller
end
@outputters.push o
Logger.log_internal {"Added outputter '#{o.name}' to '#{@fullname}'"}
end
@outputters
end
|