123456789_123456789_123456789_123456789_123456789_

Module: Logger::Severity

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Included In:
Defined in: lib/logger/severity.rb

Overview

Logging severity.

Constant Summary

Class Method Summary

Class Method Details

.coerce(severity)

[ GitHub ]

  
# File 'lib/logger/severity.rb', line 29

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