Module: Logger::Severity
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Included In:
| |
Defined in: | lib/logger/severity.rb |
Overview
Logging severity.
Constant Summary
-
DEBUG =
Low-level information, mostly for developers.
0
-
ERROR =
A handleable error condition.
3
-
FATAL =
An unhandleable error that results in a program crash.
4
-
INFO =
Generic (useful) information about system operation.
1
-
LEVELS =
private
# File 'lib/logger/severity.rb', line 19{ "debug" => DEBUG, "info" => INFO, "warn" => WARN, "error" => ERROR, "fatal" => FATAL, "unknown" => UNKNOWN, }
-
UNKNOWN =
An unknown message that should always be logged.
5
-
WARN =
A warning.
2
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