def level_for_context(context)
      lvl = self.levels_cache[nil]
      root = []
      context.to_s.split('::').each do |part|
        root << part
        path = root.join '::'
        lvl = self.levels_cache[path] if self.levels_cache.key? path
      end
      lvl
    end
def level_for_context(context)
      lvl = self.levels_cache[nil]
      root = []
      context.to_s.split('::').each do |part|
        root << part
        path = root.join '::'
        lvl = self.levels_cache[path] if self.levels_cache.key? path
      end
      lvl
    end
Private: Returns the minimum active logging level for the given context.

 context - The context of the logging call.

 Returns the minimum level that a message would be logged at for the given
 context.