/usr/lib/ruby/vendor_ruby/lumberjack/severity.rb is in ruby-lumberjack 1.0.13-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | # frozen_string_literals: true
module Lumberjack
# The standard severity levels for logging messages.
module Severity
UNKNOWN = 5
FATAL = 4
ERROR = 3
WARN = 2
INFO = 1
DEBUG = 0
SEVERITY_LABELS = %w(DEBUG INFO WARN ERROR FATAL UNKNOWN).freeze
class << self
def level_to_label(severity)
SEVERITY_LABELS[severity] || SEVERITY_LABELS.last
end
def label_to_level(label)
SEVERITY_LABELS.index(label.to_s.upcase) || UNKNOWN
end
end
end
end
|