|
Server IP : 185.61.154.36 / Your IP : 216.73.216.44 Web Server : Apache System : Linux host67.registrar-servers.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64 User : gettoplisting ( 12043) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home/../opt/alt/python-internal/../python313/../python313/../ruby33/share/ruby/logger/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
# frozen_string_literal: true
class Logger
# Logging severity.
module Severity
# Low-level information, mostly for developers.
DEBUG = 0
# Generic (useful) information about system operation.
INFO = 1
# A warning.
WARN = 2
# A handleable error condition.
ERROR = 3
# An unhandleable error that results in a program crash.
FATAL = 4
# An unknown message that should always be logged.
UNKNOWN = 5
LEVELS = {
"debug" => DEBUG,
"info" => INFO,
"warn" => WARN,
"error" => ERROR,
"fatal" => FATAL,
"unknown" => UNKNOWN,
}
private_constant :LEVELS
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
end
end