def enabled?(level, context)
      lvl = self.levels_cache[context]

      # Return false if no level is configured.
      return false unless lvl

      LEVELS.index(level) >= LEVELS.index(lvl)
    end
def enabled?(level, context)
      lvl = self.levels_cache[context]

      # Return false if no level is configured.
      return false unless lvl

      LEVELS.index(level) >= LEVELS.index(lvl)
    end
Internal: Returns true if the appender is configured to log messages of
 the given level within the given context, otherwise returns false.

 level   - The level of the message.
 context - The context of the message.

 Returns true if the appender is configured to log messages of the given
 level within the given context, otherwise returns false.