def map_levels
      return [] unless defined?(::Logger::Severity)
      @@map_levels ||=
        ::Logger::Severity.constants.each_with_object([]) do |constant, levels|
          levels[::Logger::Severity.const_get(constant)] = level_by_index_or_error(constant)
        end
    end
def map_levels
      return [] unless defined?(::Logger::Severity)
      @@map_levels ||=
        ::Logger::Severity.constants.each_with_object([]) do |constant, levels|
          levels[::Logger::Severity.const_get(constant)] = level_by_index_or_error(constant)
        end
    end
Mapping of Rails and Ruby Logger levels to Sapience levels