module Logger::Severity

def self.coerce(severity)

def self.coerce(severity)
  if severity.is_a?(Integer)
    severity
  else
    key = severity.to_s.downcase
    LEVELS[key] || raise(ArgumentError, "invalid log level: #{severity}")
  end
end