|
# File log4r/logger.rb, line 53
def deal_with_inheritance(_level)
mypath = @fullname.split Log4rConfig::LoggerPathDelimiter
@name = mypath.pop
if mypath.empty? # then root is my daddy
@path = ""
# This is one of the guarantees that RootLogger gets created
@parent = Logger.root
else
@path = mypath.join(Log4rConfig::LoggerPathDelimiter)
@parent = Repository.find_ancestor(@path)
@parent = Logger.root if @parent.nil?
end
# inherit the level if no level defined
if _level.nil? then @level = @parent.level
else @level = _level end
Repository.reassign_any_children(self)
end
|