module Logger::Severity

Logging severity.

Constants

DEBUG

Low-level information, mostly for developers.

ERROR

A handleable error condition.

FATAL

An unhandleable error that results in a program crash.

INFO

Generic (useful) information about system operation.

LEVELS
UNKNOWN

An unknown message that should always be logged.

WARN

A warning.

Public Class Methods

coerce(severity) click to toggle source
# File 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